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