• Post Reply Bookmark Topic Watch Topic
  • New Topic

passing render parameters to doView

 
vijay sag
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm setting render paramater in process actions as below.

public void processAction(ActionRequest request, ActionResponse response) throws PortletException {

response.setRenderParameter("strOrderId", "X1234");
super.processAction(request, response);

}

And trying to retrieve the above render paramater in doview method.

public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
response.setContentType(request.getResponseContentType());
response.getWriter().println("Render parameter" + request.getParameter("strOrderId"));

super.doView(request, response);
}


But I'm not able to retrieve this paramter in doView method. I researched in forums and in some threads its given that we can pass information to doView through render paramaters.

I'm using JSF JSR 168 portlets and portal version is 6.1.0.5.

Could you please let me know whether im passing and retreiving the paramaters in right way?

Thanks,
Vijay.





 
George Stafford
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way I found that worked for me was in the action to do the following:

actionRequest.getPortletSession().setAttribute("strOrderId", "X1234");


Then in the doView you can retrieve it from the portlet session:

request.getPortletSession().getAttribute("strOrderId")

 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!