You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Stuart Belden <SB...@bjc.org> on 2003/10/13 17:38:22 UTC
nesting submenus
I'm looking for a way to nest submenus as opposed to drawing them side-by-side like jetspeed does now. Has anyone done this or have any creative ideas on how to do this?
I know jetspeed-menu.vm gets called once for each menu or submenu. Each menu will have n items in it. When a menu is being drawn in the vm we know which item is selected but we _don't_ know if there is a submenu attached to the selected item or not, afaict.
Also, in what java class do portlet sets (menus) get rendered? I see that VelocityPortletControl calls TurbineVelocity.handleRequest() to handle one particular menu (one call to jetspeed-menu.vm); what calls VelocityPortletControl.buildContent() for each portlet set?
Thanks,
stu
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
Re: nesting submenus
Posted by ja...@sirma.bg.
Отговор Stuart Belden <SB...@bjc.org>:
And something I forgot: You build the tabs collection in the buildContext method
of the control.
> I'm looking for a way to nest submenus as opposed to drawing them
> side-by-side like jetspeed does now. Has anyone done this or have any
> creative ideas on how to do this?
>
> I know jetspeed-menu.vm gets called once for each menu or submenu. Each menu
> will have n items in it. When a menu is being drawn in the vm we know which
> item is selected but we _don't_ know if there is a submenu attached to the
> selected item or not, afaict.
>
> Also, in what java class do portlet sets (menus) get rendered? I see that
> VelocityPortletControl calls TurbineVelocity.handleRequest() to handle one
> particular menu (one call to jetspeed-menu.vm); what calls
> VelocityPortletControl.buildContent() for each portlet set?
>
> Thanks,
> stu
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
Re: nesting submenus
Posted by ja...@sirma.bg.
Отговор Stuart Belden <SB...@bjc.org>:
Hi,
We've implemented this by a custom control (extends VelocityPortletSetControl).
Its major feature is that when building the "tabs" collection (see
jetspeed-menu.vm) it includes all children that have children themselves.
That is, a collection is passed to the vm template (tabs) that contains the
menus to be rendered. And if menu is open, its children are also included in
the tabs collection. For open menus (each of them a PortletSet), submenus are
included. If a submenu is also a PortletSet, its children are included etc.
The psml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<portlets id='300' xmlns="http://www.apache.org/2000/02/CVS">
<security-ref parent="user-view_admin-all"/>
<metainfo>
<title>Default Start page</title>
</metainfo>
<controller name="CardPortletController"/>
<control name="MainMenuControl"/>
<portlets id='301'>
<security-ref parent="user-view_admin-all"/>
<control name="SubMenuControl"/>
<controller name="CardPortletController">
<parameter name="parameter" value="select-panel"/>
</controller>
<metainfo>
<title>Home</title>
</metainfo>
<entry id='3011' parent="MyPage" >
............................................
............................................
Hope this helps!
Jana
> I'm looking for a way to nest submenus as opposed to drawing them
> side-by-side like jetspeed does now. Has anyone done this or have any
> creative ideas on how to do this?
>
> I know jetspeed-menu.vm gets called once for each menu or submenu. Each menu
> will have n items in it. When a menu is being drawn in the vm we know which
> item is selected but we _don't_ know if there is a submenu attached to the
> selected item or not, afaict.
>
> Also, in what java class do portlet sets (menus) get rendered? I see that
> VelocityPortletControl calls TurbineVelocity.handleRequest() to handle one
> particular menu (one call to jetspeed-menu.vm); what calls
> VelocityPortletControl.buildContent() for each portlet set?
>
> Thanks,
> stu
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org