WebSphere Portal Server - Tring to pass url request parameters to a portlet

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > February 2007 > Tring to pass url request parameters to a portlet





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 Tring to pass url request parameters to a portlet

2007-02-23, 1:18 pm

I am desperately trying to pass url originated parameters to a specific portlet on a specific page. I followed the article http://www-128.ibm.com/developerwor...0508_scott.html but it does not work for me. When I
use the URL, The correct page appears but no parameters are provided to the portlet.
Please note that I am using portal 6.0.

I have attached the JSP of my implementation.
Anyone succeeded with that before?

10x
Michael
Athar Shiraz

2007-02-24, 7:17 pm

Most of those articles suck! just get the book programming portlets (best in my opinion) and they deal with this issue in the first chapter!

I would write my own article to help you out I think.



> I am desperately trying to pass url originated
> parameters to a specific portlet on a specific page.
> I followed the article
> http://www-128.ibm.com/developerworks/websphere/librar
> y/techarticles/0508_scott/0508_scott.html but it does
> not work for me. When I use the URL, The correct page
> appears but no parameters are provided to the
> portlet.
> Please note that I am using portal 6.0.
>
> I have attached the JSP of my implementation.
> Anyone succeeded with that before?
>
> 10x
> Michael



2007-02-25, 1:17 pm

This seems like an old book, is it relevant for portal 6.0?
Can you provide a short description of the solution for this problem?

10x
Michael
Athar Shiraz

2007-02-26, 1:19 pm

It sure is relevant.

Let me put something up maybe on a google blog or something but you will find the book to be much more use than anything else out there (any one time article).

> This seems like an old book, is it relevant for
> portal 6.0?
> Can you provide a short description of the solution
> for this problem?
>
> 10x
> Michael



2007-02-26, 7:18 pm

This code works on Portal 5.1 and 6.0. Are you sure that you correctly created the reference to the portlet container, not the portlet? The first time I used this article, I missed this key paragraph:

Although it is possible to define the unique name of a portal page in the WebSphere Portal administration console, you cannot define the unique name of a portlet window. You need to write an XML deployment file, and create these unique names using the xml
access utility.

Brian

2007-02-26, 7:18 pm

In portal 6.0 you have the option to define a unique name for a specific portlet instance and this is what I used. Is it not correct to use this ID? I will look into the xmlaccess script which I wanted to avoid.

10x
Michael
bochs

2007-02-27, 7:16 pm

I've not seen anywhere in Portal v6 where you can specify a unique id for the portlet instance, just the portlet. Where is that option?

Regardless, I have used the XMLAccess route with v5.1 and v6 so I know that will work. It takes just a minute to write and execute the script.

2007-02-28, 7:22 am

Under "Custom Unique Names" you can specify a unique name for a portlet instance but this does not apply to this case since you need a unique id of portlet instance container that you can only specify through XML access. This was my mistake.

Finally I solved it in a slightly different way:
1. Using the XML configuration I created a page and put a portlet in it and assigned a unique id to its container (as specified in the article)
2. I mapped this page to a custom URL context (for convenience).
3. I modified the theme Default.jsp to generate a URL to the portlet including any provided parameters using the <portal-navigation:urlGeneration> tag giving the unique name of the page and portlet container window. This is done only if the URL contains a
'notif' parameter.

Thank you all for your help
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com