WebObjects/Project WONDER/Frameworks/Ajax/AjaxUpdateContainer

< WebObjects < Project WONDER < Frameworks < Ajax

AjaxUpdateContainer

AjaxUpdateContainer is a particularly cool component that allows any component on your page to be refreshed in the background without a full page refresh. AjaxUpdateContainer uses a WOComponentContent. All content between its webobjects tags will be refreshed when it is ordered.

If your AjaxUpdateContainer contains component actions, you must include the ERExtensions framework in your application and extend ERXApplication and ERXSession as described in the Project Wonder Quickstart guide. If all of your actions are Direct Actions inside the update container, this is not necessary.

Additionally, if you intend to use the "observeFieldID" binding, you must also include the ERExtensions framework (as described above). The requirement is because a partial form submit is necessary (to send the modified observed field back to the server), and WOForm required a change to be able to recognize that it should takeValuesFromRequest for the observed value.

A convenience Javascript function is autogenerated for each AjaxUpdateContainer of the form "<id>Update()". For instance, if your id is "messageBox", then the Javascript function would be named "messageBoxUpdate()". Calling this function will cause the container to refresh.

A series of demos of AjaxUpdateContainer is available in the AjaxExamples project in Project Wonder.

Wonder Bindings
Prototype Bindings

Prototype Documentation

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.