简体   繁体   中英

Spring Roo , Custom Dojo Build

I have been attempting to implement a custom dojo build to replace the dojo version that comes with spring roo 1.1.5.

I followed the instructions at

http://sagittech.blogspot.com/2011/08/asdadsad-qwasdace-aavvrv-place-holder.html

as well as

http://www.qc4blog.com/?p=1001

I have been able to create the builds.

My problem is that when I place the new build into the project like

WEB-INF\\classes\\META-INF\\web-resources\\dojo-1.6.2\\

(FYI: I renamed the version from 1.6.1 to 1.6.2 to avoid conflict with same version as in Roo.)

When I load my web page I get

syntax error http://localhost:8080/app-1.0.0/resources/dojo-1.6.2/dojo/dojo.js Line 14

also

missing ) after argument list http://localhost:8080/app-1.0.0/ Line 3

dojo is not defined http://localhost:8080/app-1.0.0/resources/spring/Spring-Dojo.js Line 16

So, the question is:

What is the proper way to integrate a new custom dojo build with Spring Roo?

Is there a special way to build dojo to make this happen?

Are there additional steps required to make a custom build work with Roo?

Update:

Below is my profile file to create the new dojo.js

dependencies = {
optimize:"shrinksafe", 
stripConsole: "normal",
cssOptimize: "comments",
layers:
[
{
name: "dojo.js",
layerDependencies:
[
"dojo.js",
],
dependencies:
[
"dijit.Dialog",
"dijit.Tooltip",
"dijit.form.DateTextBox",
"dijit.form.CheckBox",
"dijit.form.CurrencyTextBox",
"dojox.widget.Standby",
"dijit.form.ComboBox",
"dijit.form.FilteringSelect",
"dojox.form.PasswordValidator",
"dojo.parser",
"dijit.form.Form",
"dojox.grid.EnhancedGrid",
"dojo.data.ItemFileWriteStore",
"dijit.TitlePane",
"dijit.layout.LayoutContainer",
"dijit.layout.BorderContainer",
"dijit.form.SimpleTextarea",
"dijit.form.Textarea",
"dojo.date.locale",
"dojo.data.ItemFileReadStore",
"dojox.grid.cells.dijit",   
"dojox.grid.DataGrid",
"dijit.form.Button",
"dijit.form.ValidationTextBox",
"dijit.Dialog",
"dijit.form.NumberSpinner",
"dojox.grid.enhanced.plugins.Menu",
"dojox.grid.enhanced.plugins.NestedSorting",
"dojox.grid.enhanced.plugins.IndirectSelection",
"dijit.MenuItem",
"dijit.MenuSeparator",
"dijit.PopupMenuItem",
"dijit.Menu",
"dojox.form.Uploader",
"dojox.form.uploader.FileList",
"dojox.form.uploader.plugins.Flash",
"dijit.form.Select"
 ]
}
],

prefixes: [
["dijit", "../dijit"],
["dojox", "../dojox"]
]

}

After making sure that I made the new optimized file the same as dojo.js to insure that dojo was found I now get the following error:

failed loading /app-1.0.0/resources/dojo-1.6.2/dojo/./parser.js with error: SyntaxError: syntax error http://localhost:8080/app-1.0.0/resources/dojo-1.6.2/dojo/dojo.js Line 14

I solved this in part by an answer given at

http://forum.springsource.org/showthread.php?118073-javascript-files-not-loading

I made sure that I had

<script type="text/javascript">dojo.require("dojo.parser");<!-- required for FF3 and Opera --></script>

Also, I had to verify that

<c:set var="dojo_baseline">/resources/dojo-1.6.2/</c:set>

pointed to the correct folder. Previously I had it at 1.6.1

also, that

webmvc-config.xml

looked like

<mvc:resources location="/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM