Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added more dojo notes

...

  1. reference the new Dojo tag library
  2. update the head tag
  3. update all ajax themed tags
  4. check inline scripts
  5. 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:

Code Block
none
none
2008-04-19 14:32:30,475 ERROR [http-8443-Processor23] [[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: No tag "datetimepicker" defined in tag library imported with prefix "s"

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

...