Persisting portlet forms data in WPS V5.1

One of the biggest problems faced with the WPS portlets is, User adds data to a form on a portlet, and before submitting the data, navigates to some other portlets. Now, when the user comes back to the original portlet, how do we show the same data back to the user.

One of the techniques is to leverage simple JavaScript techniques that force the form submit so that the back-end application can take care of persisting the form data into a session object. In order to transparently submit the form, one can use the BODY tag unload() event. However, because there are no HTML or BODY tags in any of the portlet views as part of the portlet standard, one needs to add the unload() event to the theme's Default.jsp.

So, once the user navigates to another portlet, the unload() event submits the data to the back end application, that persists the data in the portlet session. When the user navigates back to the portlet, the portlet can use the data from the portlet session to paint the form data in the portlet.

Filed in:
0 Comments To ' Persisting portlet forms data in WPS V5.1 '

Post a Comment