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 Legolas Woodland <le...@gmail.com> on 2005/12/27 12:11:41 UTC

How i should navigate to another page of my portlet ?

Hi
Thank you for reading my post.
how i can go to another page of my portlet ?
for example ,  one of my portlet has 2 pages and i want to go to page 2 
from page 1 by a hyperlink ,what will url looks like ?
is it ok to change the url to page.jsp , or it needs some prefix.

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: How i should navigate to another page of my portlet ?

Posted by Jouni Rajala <jo...@systeemiratkaisu.fi>.
Legolas Woodland kirjoitti:

> Hi
> Thank you for reading my post.
> how i can go to another page of my portlet ?
> for example ,  one of my portlet has 2 pages and i want to go to page 
> 2 from page 1 by a hyperlink ,what will url looks like ?
> is it ok to change the url to page.jsp , or it needs some prefix.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
I have 5 page wizard portlet in my application for doing some task. I 
created 5 jsp for each page.
then I have names of the jsp's as static variables. like:
    public static final String JSP_FOLDER    = "/mywizarportlet/jsp/";
    public static final String VIEW1_JSP      = 
"PlayerPortletView1";       
    public static final String VIEW2_JSP      = 
"PlayerPortletView2";       
....

I store current page into sessionbean in processAction after doing the 
neccessary validation
for fields.

In doView i get the current page from session and redirect the
request to correct jsp (after filling the viewbean with neccessary data)

redirecting to page1 for example:
PortletRequestDispatcher rd = 
getPortletContext().getRequestDispatcher(JSP_FOLDER+"/"+VIEW1_JSP));
rd.include(request,response);

--
Jouni Rajala

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org