The ajax theme extends the xhtml theme with AJAX features. The theme uses two popular AJAX/JavaScript libraries: Dojo and DWR. AJAX features include:
- AJAX Client Side Validation
- Remote form submission support (works with the submit tag as well)
- An advanced div template that provides dynamic reloading of partial HTML
- An advanced a template that provides the ability to load and evaluate JavaScript remotely
- An AJAX-only tabbedPanel implementation
- A rich pub-sub event model
...
Wiki Markup |
---|
{snippet:id=all|lang=xml|url=action2/core/src/main/resources/template/ajax/controlheader.ftl} |
The header provides for AJAX Client Side Validation by checking if the validate
attribute is set to true. If it is, a validation request is made on each onblur
event for a HTML Struts Tags. Some people don't like the onblur
behavior; they would rather a more advanced timer (say, 200ms) be kicked off after every keystroke. You can override this template and provide that type of behavior if you would like.
...