Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to set Public Render Parameters in JSR286

28 views
Skip to first unread message

R@j@Sekh@r

unread,
Nov 12, 2008, 1:24:37 AM11/12/08
to
Hi all,


How can i set public render parameters in JSR 286 please do the needfull

Thanks
Rajasekhar Yenduva

Sun Certified Java Programmer V5.0

R@j@Sekh@r

unread,
Nov 12, 2008, 3:25:37 AM11/12/08
to

Konrad Wulf

unread,
Nov 12, 2008, 3:45:14 AM11/12/08
to
Sometimes it's worth looking into the spec at http://www.jcp.org/en/jsr/detail?id=286 (pp. 78):

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.

Konrad Wulf

unread,
Nov 12, 2008, 3:46:39 AM11/12/08
to

R@j@Sekh@r

unread,
Nov 12, 2008, 3:55:20 AM11/12/08
to
Thank u very much

R@j@Sekh@r

unread,
Nov 12, 2008, 3:54:38 AM11/12/08
to
Thank you very much

R@j@Sekh@r

unread,
Nov 12, 2008, 8:17:10 AM11/12/08
to
hi kwulf,

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

R@j@Sekh@r

unread,
Nov 12, 2008, 8:17:49 AM11/12/08
to
can u clarify my doubt

bruno...@bb.com.br

unread,
Nov 19, 2008, 2:43:53 PM11/19/08
to
Hi,

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.

R@j@Sekh@r

unread,
Nov 24, 2008, 12:07:21 PM11/24/08
to
Hi bruno.souza

Here I got solution for our doubt so refer the below url
http://blogs.sun.com/deepakg/entry/jsr286_public_render_parameter_feature

0 new messages