This content has been marked as final.
Show 4 replies
-
1. Re: Can we have dynamic menus in rich:panelMenuItem
ilya_shaikovsky Feb 10, 2010 6:56 AM (in response to mabimal)you could use c:forEach for that. check out demosite sources. Left navigation made in such way. -
2. Re: Can we have dynamic menus in rich:panelMenuItem
bp2s Mar 7, 2010 6:44 AM (in response to ilya_shaikovsky)Hi - what about looping on both Groups and Items?
I tried this but got the error following.
<rich:panelMenu style="width:35%" mode="ajax"
iconExpandedTopGroup="/img/logListIcon.png"
iconCollapsedTopGroup="/img/logListIcon.png"
iconCollapsedGroup="/img/logListFolderIconClosed.png"
iconExpandedGroup="/img/logListFolderIconOpen.png"
iconGroupTopPosition="left" iconItem="/img/logFileIcon.png">
<!-- feed iteration -->
<ui:repeat items="#{PanelMenu.panelNodes}" var="map">
<rich:panelMenuGroup label="#{map.key}"
style="padding-left: 20px;">
<ui:repeat items="${map.value}" var="entry">
<rich:panelMenuItem label="#{entry}"
action="#{PanelMenu.updateCurrent}">
<f:param name="current" value="#{entry}" />
</rich:panelMenuItem>
</ui:repeat>
</rich:panelMenuGroup>
</ui:repeat>
</rich:panelMenu>
<rich:panel style="width:65%"
bodyClass="rich-laguna-panel-no-header">
<a4j:outputPanel ajaxRendered="true">
<h:outputText value="#{PanelMenu.currentLog}" id="current" />
</a4j:outputPanel>
</rich:panel>
-
3. Re: Can we have dynamic menus in rich:panelMenuItem
nbelaevski Mar 7, 2010 8:24 AM (in response to bp2s)No, it's not supported currently. -
4. Re: Can we have dynamic menus in rich:panelMenuItem
bp2s Mar 7, 2010 8:58 AM (in response to nbelaevski)Nick, thanks for the response.
If I have a Map<String, ArrayList<String>> in my backing bean, how else can I get all the details into a panelMenu?
I'm thinking something like this:
one, [two, three]
four, [five, six]
where the panelMenuGroups are one and four and the two arrays are items within the respective groups. Your suggestion of the nested ui:repeat method being not supported, leads me to think there is a way of doing it using pure java to do it but I'm not sure how to acheive this. I've logged this as a separate post here: http://community.jboss.org/thread/149062?tstart=0
Any help greatly appreciated.