-
1. Re: it is possible to create more than one action for portle
habicht Sep 11, 2007 6:06 AM (in response to k3nnymusic)hi
action=1 is used if you use an ActionURL as link- or form-target. this means that (if present) the processAction-method is called in your portlet.
action=2 means that you used a RenderURL
as for your actions: you could use an ActionURL or RenderURL with a parameter that you set which then causes the action you want -
2. Re: it is possible to create more than one action for portle
k3nnymusic Sep 14, 2007 10:51 AM (in response to k3nnymusic)Thanks everything its fine, but I have got problem with windowstate action(minimize maximize etc) action=a. I dont know what is called and I can't found it in jsr-168 specyfication.
I have got some attribute, and I lose it when I change window state of the portlet. Could you help me? -
3. Re: it is possible to create more than one action for portle
k3nnymusic Sep 14, 2007 11:57 AM (in response to k3nnymusic)Ofcourse I meant request attribute.
-
4. Re: it is possible to create more than one action for portle
k3nnymusic Sep 17, 2007 4:51 AM (in response to k3nnymusic)Could anybody tell me how can I fix my maximize action problem?
-
5. Re: it is possible to create more than one action for portle
k3nnymusic Sep 17, 2007 5:20 AM (in response to k3nnymusic)Temporarily I added new private variable in portlet class which contain last user request parameter. This is not a good mvc result so I think it must be other solution.
Any suggestion?
Thanks -
6. Re: it is possible to create more than one action for portle
theute Sep 17, 2007 5:33 AM (in response to k3nnymusic)You need to use renderParameters
-
7. Re: it is possible to create more than one action for portle
k3nnymusic Sep 17, 2007 5:46 AM (in response to k3nnymusic)Thanks a lot!
-
8. Re: it is possible to create more than one action for portle
k3nnymusic Sep 18, 2007 9:41 AM (in response to k3nnymusic)Hmm i can't understand this, becouse I'm loosing my request when I change windowstate though I set renderParameter. Everything is ok when I don't change window states.
In processAction I setRender parameter if any page call action with param name="page"public void processAction(JBossActionRequest request, JBossActionResponse response) throws PortletException, IOException, UnavailableException{ String page = "0"; if(request.getParameter("page")!=null){ page = request.getParameter("page"); response.setRenderParameter("page", page); } }
In view I getting page parameter and set page to dispatch.public void doView(JBossRenderRequest request, JBossRenderResponse response) throws PortletException, IOException, UnavailableException{ if(request.getParameter("page")!=null) page = Integer.parseInt(request.getParameter("page")); String jspName; if(page==0) jspName = "/WEB-INF/jsp/view.jsp"; else jspName = "/WEB-INF/jsp/play.jsp"; PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher(jspName); prd.include(request, response); }
When I change windowstate probably I lost it because, change window state action don't sending action:params. How can I do this?