Method for one-time rendering of Web content and state-dependent action processing using the PortletPageListener interface.
Original Publication Date: 2004-Aug-17
Included in the Prior Art Database: 2004-Aug-17
Method for one-time rendering of Web content and state -dependent action processing using the PortletPageListener interface .
Disclosed is a method to request user input and suspend the rendering of a portlet until the user response is received.
This restricts how portlets can implement certain behaviours, such as pausing to get
user confirmation, before proceeding with an action, as in the following example:
1. User clicks a logout button in the portlet (HTML form), to disconnect from an application external to the Portal.
2. Portlet starts processing the logout action in actionPerformed() method.
3. Portlet displays a warning dialog box with an OK button.
4. User clicks OK to confirm and proceed with logout.
5. Portlet continues to process action, and logs out.
An alternative program flow which would be permitted is:
1. User clicks a logout button in the portlet (HTML form).
2. Portlet processes the logout action in actionPerformed() method. If the action was recognized, then set a logout flag.
3. After action processing is complete, the portlet will be re-rendered. At the beginning of portlet rendering, check whether the logout flag was set.
4. If set, then show a different HTML form (JSP) that contains a warning message with an OK button.
5. Unset the logout flag at the end of portlet rendering, so that it will not display the warning JSP on the next rendering cycle.
6. When the user clicks OK, process this confirmation action and perform the logout.
However, this requires the developer to add an additional program option, and to maintain an additional JSP file. The server must also handle an additional cycle of action processing and content rendering. This can be a concern since all other portlets on the page must be re-rendered at the same time.
Another possible solution would be to incorporate an applet that requests and receives user input, but that significantly increases the complexity of the portlet.
The disclosed method combines elements of the two flows described above. The action processing phase neither displays a warning dialog box, nor performs the actual logout action. Instead, it only sets a flag in the PortletSession, to...