[jboss-user] [JBoss Portal] - Re: correct use of processAction and doView
julien@jboss.com
do-not-reply at jboss.com
Sat Jul 7 19:31:01 EDT 2007
If an error happens, you need to configure the render parameters in the processAction for the next render (hence doView) method, such as:
| resp.setParameter("error", "My Error Message");
|
Then in doView you can do:
| String error = req.getParameter("error");
| if (error != null)
| {
| displayError(error);
| }
| else
| {
| // Normal treatment
| }
|
Of course the down side of this way to do is that the error message will happen on every render of the portlet until the user clicks on one link of the portlet that will change the render parameters.
If you want to void that then you should store the error message in the PortletSession and remove it from the session during the render.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061649#4061649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061649
More information about the jboss-user
mailing list