File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes How to retrieve portlet id within a portlet code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "How to retrieve portlet id within a portlet code?" Watch "How to retrieve portlet id within a portlet code?" New topic
Author

How to retrieve portlet id within a portlet code?

Alka Parveen
Greenhorn

Joined: Oct 29, 2007
Posts: 5
Hey,
I am trying to retrieve a portlet id. Its a jsr 168 portlet with vignette portlal. Can anyone please suggest that except using RenderResponse's getNamespace() method, how to do this. Is there any vignette API for this. Please help in this regard.

Thanks in advance,
Alka
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Are you talking about the name that appears in the portlet.xml file, or the unique id that the portal assigns to a unique user instance of a portlet?

Either way, I'm not sure if you're going to have too much luck, other than with the encodeNamespace.

Maybe you could tell me what you're trying to do. If it's the name in the portlet.xml file, why not just duplicate it as an init-param and read it by the PortletConfig or even the PortletContext, depending upon the scope you're after. I'm trying to imagine what your problem is - I think assigning an initial parameter to the portlet might solve it.

Here's a nice little CBT tutorial on how the various portlet config objects work: Working with PortletConfig and PortletContext Objects with a JSR168 Resource

Kind regards,

-Cameron McKenzie
Alka Parveen
Greenhorn

Joined: Oct 29, 2007
Posts: 5
hey thanks,
Actually i am try to read portlet unique id within portlet code. i am using vignette portal. I know that it is possible through JSR 168 API's RenderResponse but i am asking for any other method which can do this. because most of the time i dont have render parameters in my portlet. so if you know any of vignette portal API or any other method then please share.

Thanks for your help,
Alka
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

zeba, please check your private messages.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
murali kankanala
Ranch Hand

Joined: Nov 15, 2004
Posts: 110
Hi Friends

Can any one help me how to start learning a portal development, for example i want to know how to work on Vignette Portal.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to retrieve portlet id within a portlet code?