Forums de discussion
Want to pass a parameter from prcessaction to Jsp Page
Bikash Ghibila, modifié il y a 10 années.
Want to pass a parameter from prcessaction to Jsp Page
Junior Member Publications: 60 Date d'inscription: 31/03/11 Publications récentes
Hi All,
I want to pass a parameter from process action to jsp page.
For this I use actionrequest in the action page to set the value and
renderrequest to get the value but it is not working..
If i use session then it is working.
But i donot want to use session.
Please suggest how i solve this issue without session
I want to pass a parameter from process action to jsp page.
For this I use actionrequest in the action page to set the value and
renderrequest to get the value but it is not working..
If i use session then it is working.
But i donot want to use session.
Please suggest how i solve this issue without session
Wilson Man, modifié il y a 10 années.
RE: Want to pass a parameter from prcessaction to Jsp Page
Liferay Master Publications: 581 Date d'inscription: 21/06/06 Publications récentes
you may try using Public Render Parameter to satisfy your requirement. Just google it and you should see some examples.
Neil Griffin, modifié il y a 10 années.
RE: Want to pass a parameter from prcessaction to Jsp Page
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
In your processAction method you should be able to call ActionResponse.setRenderParameter(String, String) and then call RenderRequest.getParameter(String) in order to retrieve the value in the doView method.
Ugandhar Reddy, modifié il y a 10 années.
RE: Want to pass a parameter from prcessaction to Jsp Page
Junior Member Publications: 25 Date d'inscription: 21/11/11 Publications récentes
i assume you are using JSR 286 complaint portlet.
Just assign variable in processAction as
actionRequest.setAttribute("test", "from processAction");
And get the variable in doView or render or JSP as
renderRequest.getAttribute("test");
Just assign variable in processAction as
actionRequest.setAttribute("test", "from processAction");
And get the variable in doView or render or JSP as
renderRequest.getAttribute("test");
Neil Griffin, modifié il y a 10 années.
RE: Want to pass a parameter from prcessaction to Jsp Page
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
The getAttribute/setAttribute method will work in Liferay Portal because it uses a single HTTP POST to perform the ActionRequest and subsequent RenderRequest. But JSR 286 Spec doesn't mandate this. For example, the Pluto portlet container does the ActionRequest with HTTP POST, but returns a redirect which causes a subsequent HTTP GET that invokes the RenderRequest.