Following are the steps to create portlets that use the public render parameters:
Step-1. We will declare the render parameters to be shared in the portlet.xml file by setting the public render parameters at the portlet application level.
……
. . .
……
Step-2. Now specify the render parameter that the portlet would like to share in the portlet section.
……..
......
. . .
. . .
Strep-3 And now finally set the render parameter in the processAction() method:
public class ProductsPortlet extends GenericPortlet {
. . .
public void processAction(ActionRequest req, ActionResponse res) throws IOException, PortletException {
. . .
res.setRenderParameter("product-id", product);
}
. . .
}
Enjoy coding :-)
No comments:
Post a Comment