AJAX Operations

Top  Previous  Next

AJAX operations allow to send data to server without full page refresh. The components provide full-featured support for AJAX operations that can be initiated by some events from the client side. For example clicking mouse on component, Drag and Drop operation, send component refresh or other command from JavaScript, etc.

 

To enable AJAX operations it's required to set property ajaxEnabled = true.

 

The components allow to handle the following additional events:

ajaxClientHandler – user function to be called before sending AJAX request
ajaxListener – server side listener to be called on the server side. This listener must implement com.softaspects.jsf.component.base.listener.AjaxEventListener.

 

If AJAX operation does not require components' refresh (like click on menu item) it is possible to set ajaxTargetElement property. This will allow to send response content to corresponding element on the client side (for example HTML div element). In addition , if property is not set HTML div element will be created and added to the end of the document automatically. If AJAX operation requires to refresh the components (for example table refresh) this property will be ignored and the ones will be refreshed automatically.