...
- reference the new Dojo tag library
- update the head tag
- update all ajax themed tags
- check inline scripts
- check inline widgets
Info |
---|
If this is a major undertaking for your application, it's recommended to modify, test and validate each page one at a time. |
...
Note | |||||||
---|---|---|---|---|---|---|---|
If you forget to migrate a tag reference from the core to the dojo plugin you will receive an exception similar to the one below:
|
Check inline javascript
If your ajax html results contain inline javascript that needs to be executed after updating the DOM, ensure your ajax tags set executeScripts="true" and separateScripts="true". These attributes instruct the widget to search for javascript in the result,
extract it, update the DOM with the result and then execute the javascript.
eg. The following bind will execute scripts within the result when the Submit button is pressed
Code Block |
---|
<s:submit value="Submit" id="submit3" />
<sx:bind targets="div1" highlightColor="#ffffcc" highlightDuration="500" sources="submit3"
events="onclick" href="%{#fragment3Url}" errorNotifyTopics="/error" executeScripts="true"
separateScripts="true"/>
|
Check inline widgets
If your ajax html results include dojo widgets, ensure the head tag's parseContent attribute is true. This instructs dojo to parse the ajax responses for widgets. Note that Struts2.0 always enabled this feature and it could not be turned off. Struts2.1 disables this feature and allows it to be turned on as there is a significant performance impact.
Convert EL expressions to OGNL
...