[jboss-user] [JBoss Portal] - Re: Custom navigation region
JohnnyTheHun
do-not-reply at jboss.com
Thu Dec 4 04:55:46 EST 2008
I have been thinking about this concept.
Wouldn't it be a more elegant solution if I would use a custom regionRenderer, that renders a specific portlet if it finds a
injectPortlet="MyPortletToInjectInstance"
property in a region?
But I don't know how to do this.
What I found, is that the
1. DivRegionRenderer iterates through RegionRendererContext.getWindows()
Of course this getWindows() function will not return a WindowRendererContext for the injected portlet since it is not configured via xml or the admin page.
2. For every WindowRendererContext it renders the window via RendererContext.render()
So I assume I need to create a WindowRendererContext for every injected portlet too and call the RendererContext.render() with them.
3. JBoss implements whis WindowRendererContext with the WindowContext class.
The constructor of this class is:
WindowContext(java.lang.String id, java.lang.String regionName, java.lang.String order, WindowResult result)
- What is the id?
- regionname I can handle
- what is the order?
I think the above parameters can be easily created, but for the last parameter - WindowResult - I have no idea what to write.
The constructor of WindowResult is:
WindowResult(java.lang.String title, java.lang.String content, java.util.Map actions, java.util.Map windowProperties, java.util.List<org.w3c.dom.Element> headerContent, org.jboss.portal.WindowState windowState, org.jboss.portal.Mode mode)
Can anyone help me on this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194272#4194272
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194272
More information about the jboss-user
mailing list