Ajax Improvements
Improvements to ActionField for Lightbox enhancements
1. Add property 'displayResponseInLightbox' to display the response contents in a lightbox instead of the current window.
a. Add this property to the ActionField and add to data attributes
b. ajaxSubmitForm will pass this as returnType to ajaxSubmitFullOpts.
c. ajaxSubmitFullOpts will send this over to the server.
d. ftl check for returntype and add code for lightbox by wrapping with a div with appropriate handler name.
e. Add another handler to AjaxReturnTypes (displayInLightbox)
f. The handler will invoke showLighBoxContent() for content inside the above div.
Assumption: The content inside of the div with lightbox handler will be text/html. I am asking this since there is a showLightboxUrl() too.
2. Add property 'showLightboxGroup' to display a group that have been configured to display in a lightbox. This would not trigger a server side call. - This will be taken care of by the work being done by Claus and Dan.
Improvements for Component Refresh
3. Add 'refreshTimer' property to component base. The value will be a time in seconds that the component will automatically be refreshed. -
4. Add support for refreshing multiple components at a time. Add 'alsoRefreshComponents' property that can be configured with a component that has a refresh condition.
a. Add this property to component base. It would be a list of components.
b. Pass this list as another parameter to setupOnChangeRefresh which in turn calls setupRefreshCheck(). Call retrieveComponent on each of the components passed in as the list.
Question: Will the method to call be the same for all the components or will we need to pass a map of componentIds and methodToCall from the ftl.
Smarter Ajax Returns
To support things like the dialog box return, or navigating to other views we need to make our Ajax returns 'smarter'. This essentially means when sending back an ajax response, we need to write data that is used by the ajax call to determine how the response should be handled. The handling options needs are:
5. Open in Lightbox - The content being returned should be opened in a lightbox - Same as 1.