| Author |
Problems with urlParam and JSR 168
|
|
|
| Hi,
i want to pass some paramters from an IBM API portlet to a JSR 168 portlet using the following code in the view jsp of the IBM portlet:
(wps:urlGeneration contentNode="6_0_1L8" layoutNode="3_0_1EU")
(wps:urlParam name="javax.link" value="test"/)
(a href="(%wpsURL.write(out);%)")link-text(/a)
(/wps:urlGeneration)
This works fine if the target portlet is an IBM API portlet, but not if JSR 168...
It seems like the parameter isn't visible to the portlet but according to the WPS 5.1 InfoCenter it should work if the url points directly to the Portlet on the page.
Can anybody help me with this Problem?
Thanks and Regards
Christian
Hamburg/Germany
| |
|
| Hi Christian
Where did you get the id "3_0_1EU" from?
Regards, Carsten
| |
|
| Hi Carsten,
its the unique id of the portlet as i found it in the portal administration. I tried also a custom unique name, but the problem persits. The link itself seems to be ok, because otherwise the link would not be generated.
Greetings
Christian
| |
|
| Hi Christian
The value og the layoutNode attribute should be the id for the "control" - that is the container the portlet is kept in on the portal page. You could possibly have the same portlet more than once on the same page, but in distinct controls! This is hardly
documented in the InfoCenter, and I have not found any way to get the id for the control from the admin. But, if you show the source for the portlet page in the browser, you can locate an anchor tag for the control. It has a name prefixed with 7_0_. The i
d is the name. Take care to pick the right one, if you have more than one portlet on the page.
Regards, Carsten
| |
|
| Hi Carsten,
thank you for this hint. It works!
Greetings Christian
| |
|
| I am trying to access a JSR168 portlet from theme. I am using the code below. It has two problems 1. It always goes to render (doview) 2. The urlParam is not available in the doView
I want it to go to processAction() method. Please help. Any help will be greatly appreciated. Thx.
<wps:urlGeneration contentNode="pageid"
layoutNode="7_0_7AG"
portletWindowState="Normal"
pacCheck="NoCheck" portletParameterType="action">
<wps:urlParam name="ACTION_PARAMETER" value="param_value" />
<a href="<% wpsURL.write(out); %>" class="" >JSR Portlet</a>
</wps:urlGeneration>
| |
|
| you can assign a unique name to the portlet's control via xmlAccess, and then use the unique name instead of the id.
e.g.
<component action="update" uniquename="your.control.unique.name" ordinal="last" type="control">
<portletinstance action="update" portletref="your.portlet.name"/>
</component>
</component>
and then use "your.control.unique.name" as the layout node id.
Efrat
|
|
|
|