-
1. Re: Problem regarding renderURL param
theute May 20, 2008 9:07 AM (in response to ruchika)If i understand what you are doing, this is the expected behavior.
Now if you want to reset the state on each page refresh, try this (with JBoss Portal 2.6.5 only):
Uncomment:
<!-- depends-list-element>portal:service=Interceptor,type=Command,name=CleanNS</depends-list-element -->
In:
jboss-portal-2.6.5.GA/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml
Then restart
And please let me know if that gives the behavior you expected. -
2. Re: Problem regarding renderURL param
ruchika May 20, 2008 9:26 AM (in response to ruchika)Sorry I forgot to mention the version of JBoss Portal.
I am using jboss-portal-2.6.4.
I couldn't find
<!-- depends-list-element>portal:service=Interceptor,type=Command,name=CleanNS</depends-list-element -->
in file specified by you.
Regards,
Ruchika -
3. Re: Problem regarding renderURL param
theute May 20, 2008 9:41 AM (in response to ruchika)It's only available in 2.6.5
-
4. Re: Problem regarding renderURL param
ruchika May 20, 2008 11:59 PM (in response to ruchika)Is there any other way with the help of which I can achieve the requierd behaviour?
Regards,
Ruchika -
5. Re: Problem regarding renderURL param
je.a.le May 22, 2008 4:55 AM (in response to ruchika)with plain jsp i don't know, but using a little trick inside the portlet do view you could.
the problem is from the processAction / doView method. doView keep renderParam (set in processAction), therefore, render 'old' data when switching back using the tab button. Unfortunately ActionRequest doesn't allow us to remove a renderParam - That would solve the problem - I tried using Attributes, properties but none seem to work.
The 'trick' I'm using in a similar problems is to pass param from processAction to doView using... session ! yes, it's quite dirty. Sample :public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { PortletSession session = request.getPortletSession(true); if (session != null) { String todo = request.getParameter("articleedit_todo"); session.setAttribute("todo", todo); } //...... } public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { //....... PortletSession session = request.getPortletSession(true); Object todo = session.getAttribute("todo"); session.setAttribute("todo", null); if ((todo == null ? "" : todo.toString()).compareTo("goedit") == 0) { getPortletContext().getRequestDispatcher("/WEB-INF/jsp/articles/ACAdminArticleEditPortlet_view.jsp").include(request, response); } else { getPortletContext().getRequestDispatcher("/WEB-INF/jsp/articles/ACAdminArticlePortlet_view.jsp").include(request, response); } } }
A+