WebSphere Portal Server - Problems with urlParam and JSR 168

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > October 2006 > Problems with urlParam and JSR 168





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problems with urlParam and JSR 168

2005-10-24, 6:13 pm

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

2005-11-01, 8:03 am

Hi Christian
Where did you get the id "3_0_1EU" from?
Regards, Carsten

2005-11-08, 6:40 pm

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

2005-11-09, 2:49 am

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


2005-11-14, 5:58 pm

Hi Carsten,
thank you for this hint. It works!
Greetings Christian

2006-10-25, 1:36 am

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>

2006-10-25, 1:36 am

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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com