published by Yannick on 8 June, 2011 - 15:08
The PortletRequest contains a lot of information that you will often need. For example, you will use it to set and get parameters from it.
This little snippet shows you how you can retreive the PortletRequest
Snippet:
private PortletRequest getPortletRequest(){
FacesContext ctx = FacesContext.getCurrentInstance();
PortletRequest req =
(PortletRequest)ctx.getExternalContext().getRequest();
return req;
}
Example:
This example shows you how you can retreive the value of a portlet parameter:
PortletRequest req = getPortletRequest();
String value = req.getParameter("parameterName");
Comments
Retrieving parameters from a page through http request /URL
Yannick
Can you please help us in this issue..
we are trying to send a parameter through URL to the wsrp portlet developed using webcenter PS3.
The requirement is - to capture a search string from the input text box created as part of the template located on all the webcenter pages..
we need to retrieve the portlet results page for the entered string..
I coulndt get any information related to this whether we can pass parameter to wsrp wsdl..or any other better way..
there was a reference to use public render parameters but how we do pass this from a page which is different from this portlet and these may or may not be in the same page
any help is greatly appreciated...
thanks very much in advance
Add new comment