*
The moose likes Portals and Portlets and the fly likes passing render parameters to doView Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "passing render parameters to doView " Watch "passing render parameters to doView " New topic
Author

passing render parameters to doView

vijay sag
Greenhorn

Joined: Nov 04, 2012
Posts: 1
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

Joined: Nov 20, 2012
Posts: 2
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")

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing render parameters to doView
 
Similar Threads
How to pass instance variable to the JSP
problems showing a very simple portlet in pluto
Problem with a portlet
develop a simple Hello World Portlet?
send me portlets flow code(using jet speed server)