|
Home > Archive > WebSphere Portal Server > June 2007 > PortletDevelopment: How to access page properties?
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 |
PortletDevelopment: How to access page properties?
|
|
|
| Hi guys,
I'm trying to get some page properties of the page the portlet was added to. (e.g. the page description)
How am I going to do this?
Within my JSP-File I do the following... (trying to get it using the Model-SPI)
I got the PortletServiceHome from the Context.
psh = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.portlet.service.model.NavigationModelProvider");
Then I got the NavigationModel:
NavigationModelProvider provider = (NavigationModelProvider) psh. getPortletService(NavigationModelProvide
r.class);
NavigationModel model = provider.getNavigationModel(request, response);
But how can I now access the correct page?
How do I have to use the model now?
Object node = model.getRoot();
model.hasChildren(node) -> returns true.
Maybe there's another/better/easier way?
Hope you can help me.
Thanks,
Sascha
| |
|
| If I iterate through the children, I get all the NavigationNodes which have "content root" as parent. But how can I see then, which one's the right one (which hold's this portlet).
Some time ago, I also coded some stuff with the model SPI (in a servlet context), but there I had a model.isSelectedNode() method. 
Hope you can help me,
Sascha
| |
| Michael Harris 2007-06-01, 1:21 pm |
| Go back and look at the docs for "NavigationSelectionModelProvider"
|
|
|
|
|