You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Hari, Piyush" <Pi...@intuit.com> on 2005/08/11 20:47:17 UTC
help with portlets
I want to display another JSP page in a portlet once the user clicks on a
'Submit' button. I associated the action to the processAction(ActionRequest
request, ActionResponse response) function. I am sure it gets called. What
should I include under this to accomplish my goal ?
Please help . Your hel would be greatly appreciated. I am sitting over this
issue for long now.
Thanks in advance,
Piyush
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: help with portlets
Posted by David Sean Taylor <da...@bluesunrise.com>.
Hari, Piyush wrote:
> I want to display another JSP page in a portlet once the user clicks on a
> 'Submit' button. I associated the action to the processAction(ActionRequest
> request, ActionResponse response) function. I am sure it gets called. What
> should I include under this to accomplish my goal ?
>
> Please help . Your hel would be greatly appreciated. I am sitting over this
> issue for long now.
>
> Thanks in advance,
> Piyush
>
Hi Piyush,
Try the Bridges GenericServletPortlet, or a similar approach.
It allows you to override the view page in a request attribute, and then
fall back to the prefs. Could probably use a PORTLET_SCOPE session
variable as well here.
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
String viewPage = this.defaultViewPage;
// allow ViewPage override by the request
String reqViewPage = (String) request.getAttribute(PARAM_VIEW_PAGE);
if(reqViewPage != null)
{
viewPage = reqViewPage;
}
if (this.allowPreferences == true)
{
PortletPreferences prefs = request.getPreferences();
if (prefs != null && reqViewPage == null)
{
viewPage = prefs.getValue(PARAM_VIEW_PAGE,
this.defaultViewPage);
}
}
if (viewPage != null)
{
PortletContext context = getPortletContext();
PortletRequestDispatcher rd =
context.getRequestDispatcher(viewPage);
rd.include(request, response);
}
return;
}
--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org