How can i set public render parameters in JSR 286 please do the needfull
Thanks
Rajasekhar Yenduva
Sun Certified Java Programmer V5.0
PLT.11.1.2 Public Render Parameters
In order to allow coordination of render parameters with other portlets, within the same
portlet application or across portlet applications, the portlet can declare public render
parameters in its deployment descriptor using the public-render-parameter element in
the portlet application section. Public render parameters are available in all lifecycle
methods of the portlet: processAction, processEvent, render, and serveResource.
Public render parameters can be viewed and changed by other portlets or components. In
the portlet section each portlet can specify the public render parameters it would like to
share via the supported-public-render-parameter element. The supportedpublic-
render-parameter element must reference the identifier of a public render
parameter defined in the portlet application section in a public-render-parameter
elementlxxxi. The portlet should use the defined public render parameter identifier in its
code in order to access the public render parameter.
Example:
{code}
foo
x:foo2
bar
x:foobar
portletA
...
foo
portletB
...
bar
{code}
The portlet container must only send those public render parameters to a portlet which the
portlet has defined support for using supported-public-render-parameter element in
the portlet.xmllxxxii. The portlet container must only share those render parameters of a
portlet which the portlet has declared as supported public render parameters using
supported-public-render-parameter element in the portlet.xml lxxxiii. The portlet
container is free to only provide a subset of the defined public render parameters to
portlets that are not target of a render URL as storing of render parameters is only
encouraged, but not mandated for portal / portlet container implementations. A public
render parameter that is not supplied for this request should be viewed by the portlet as
having the value null.
If the portlet was the target of a render URL and this render URL has set a specific public
render parameter the portlet must receive at least this render parameter.
A portlet can access the public render parameters in any lifecycle method via the
getPublicParameterMap method of the portlet request. In addition the portlet can access
public render parameters via the getParameter and getParameterMap methods. In the
case of a processAction or serveResource call the public parameters are merged with
the action / resource parameters set on the action / resource URL. If a action or resource
parameter has the same name as a public render parameter the public render parameter
values must be the last entries in the parameter value array.
If a portlet wants to delete a public render parameter it needs to use the
removePublicRenderParameter method on the StateAwareResponse or the
PortletURL.
i am getting like parameter null
this is my portlet.xml
file
HelloWorldPortlet
HelloWorld
HelloWorldPortlet
com.jsr286.HelloWorld
0
text/html
VIEW
EDIT
HELP
com.jsr286.messages
HelloWorldPortlet
HelloWorld
x:name
test
sencondPortlet
sencondPortlet
sencondPortlet
Second
0
text/html
VIEW
EDIT
HELP
.messages
sencondPortlet
sencondPortlet
x:name
x:name
java.lang.String
test
x:name
Have you solved this problem (public param == null)? I have the same problem here and don't know how to solve it.
Anyone can help with this?
Thanks,
Bruno.
Here I got solution for our doubt so refer the below url
http://blogs.sun.com/deepakg/entry/jsr286_public_render_parameter_feature