WebSphere Portal Server - Struts Portlet and Page Navigation

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > September 2004 > Struts Portlet and Page Navigation





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Struts Portlet and Page Navigation
Sascha Mamsch

2004-06-09, 4:51 pm

Hi,

how do I know when a user returns to a page with a Struts portlet (or
any portlet, for that matter)?

We have a portal (WPS v5) with several pages. On PageA, there is
Portlet1, a Struts portlet. The user performs some steps within that
portlet. Having reached step 3 of 5, he decides to go to a different
portal page, PageB. After some time, he goes back to PageA using the
portal navigation (in the theme). Portlet1 still displays step 3 of 5.

For us, this is a problem. We want to have the user start over again
with step 1 of 5 whenever he returns to PageA. That is, the welcome
file (in web.xml) is supposed to be called and forward to a Struts
action which must be executed. Is there a way to signal the event "user
returns to page" to the portlet?

We'd appreciate any help or comment. Regards, Sascha

Linda

2004-06-14, 10:37 am

I have exactly the same problem. Did you find a solution yet? I think you have to adjust the PageBarInclude.jsp and/or the PlaceBarInclude.jsp. Both jsp's are includes in the default.jsp.

quote:
Originally posted by Sascha Mamsch
Hi,

how do I know when a user returns to a page with a Struts portlet (or
any portlet, for that matter)?

We have a portal (WPS v5) with several pages. On PageA, there is
Portlet1, a Struts portlet. The user performs some steps within that
portlet. Having reached step 3 of 5, he decides to go to a different
portal page, PageB. After some time, he goes back to PageA using the
portal navigation (in the theme). Portlet1 still displays step 3 of 5.

For us, this is a problem. We want to have the user start over again
with step 1 of 5 whenever he returns to PageA. That is, the welcome
file (in web.xml) is supposed to be called and forward to a Struts
action which must be executed. Is there a way to signal the event "user
returns to page" to the portlet?

We'd appreciate any help or comment. Regards, Sascha

gpinkham

2004-06-15, 5:53 pm

You could have a request attribute passed from page to page.. Upon returning to the page (or on refresh to.. no difference) the attribute will not be there... Then you can check for it's presence in the jsps and if it's not there forward to the 1st
page...

<logic:notPresent attribute="DONTRUNAGAIN">
<logic:forward name="WelcomeAction"/>
</logic:notPresent>

One note.. I haven't done this yet.. thought of it today and plan to try it out this week.. so your mileage may vary... :-)
rduriseti

2004-09-08, 10:12 am

quote:
Originally posted by gpinkham
You could have a request attribute passed from page to page.. Upon returning to the page (or on refresh to.. no difference) the attribute will not be there... Then you can check for it's presence in the jsps and if it's not there forward to the 1st
page...

<logic:notPresent attribute="DONTRUNAGAIN">
<logic:forward name="WelcomeAction"/>
</logic:notPresent>

One note.. I haven't done this yet.. thought of it today and plan to try it out this week.. so your mileage may vary... :-)



did anybody solve this problem.. i a also facing the same problem.. i have a user list portlet in page A which is a struts based portlet on click of the user name i should go to page b user information portlet which is also a struts portlet. first time i click on the user link i go to index.jsp and farword a action get userinfo.do then when i go back to the User List again i click on other user in the list it goes to the UserIfno portlet it just displayes the previous user info and it dosent go to index.jsp for farword...


can some body help me in this?
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com