[ https://issues.jboss.org/browse/RF-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648085#comment-12648085 ]
Ján Jamrich edited comment on RF-11730 at 12/5/11 11:25 AM: ------------------------------------------------------------ Added example simulating this problem in Metamer [1]. Dynamic menu group really doesn't work with ui:fragment, and works correctly with c:if, but I didn't get JS error (or get it for page using c:if, not for ui:fragment... so I'm not sure if this is reason. IMHO, it sounds more like another known problem [2] [1] https://source.jboss.org/viewrep/RichFaces/modules/tests/metamer/trunk/application/src/main/webapp/components/richDropDownMenu/RF-11730_1.xhtml#r23042 [2] http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets was (Author: jjamrich): Added example simulating this problem in Metamer [1]. Dynamic menu group really doesn't work with ui:fragment, and works correctly with c:if, but I didn't get JS error (or get it for page using c:if, not for ui:fragment... so I'm not sure if this is reason. IMHO, it sounds more <s>similar</s> like another known problem [2] [1] https://source.jboss.org/viewrep/RichFaces/modules/tests/metamer/trunk/application/src/main/webapp/components/richDropDownMenu/RF-11730_1.xhtml#r23042 [2] http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets > DropDowm - dynamic menu item is not rendered when using ui:fragment > ------------------------------------------------------------------- > > Key: RF-11730 > URL: https://issues.jboss.org/browse/RF-11730 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) > Affects Versions: 4.1.0.Milestone4 > Environment: Websphere 8 - RAD 8 - JSF Mojorra 2.1.4 - Spring 3.0.6 > Final - Use @Inject @Named @SessionScoped as annotations - Firefox 7.0.1 - > Windows 7 (6.1 sp1) > Reporter: Jean ANDRE > > The dropdown menu does not display any item when we use jsf tag ui:fragment. > Under firebug, there is some javacript error such as Popup menu is null. This > error does not appear when we use c:if tag instead of ui:fragment and the > dropdown menu is working correctly. here is an extract of the involved code. > The following code build dynamically a list of menu item based on opened > tabs. When there is no tab, the dropdown menu is empty but we display a > menu-item with an "empty" label. When there are opened tabs, the dropdown > menu contains a list of opened tabs - One menu-item per tab. The behavior of > this dropdown menu is similar to the menu Windows in MDI user interface style. > To make a summary, dropdown menu seems to not support ui:fragment tag. > {code} > <!-- --> > <!-- OPENED TABS --> > <!-- --> > <rich:toolbarGroup id="openedTabs" location="right"> > <rich:dropDownMenu id="menu-opened-tabs"> > <f:facet name="label"> > <h:graphicImage value="/images/downBlackArrow.png" > title="#{msg['menu.item.tab.tooltip']}" /> > </f:facet> > <c:if test="#{empty desktopTabController.desktopTabBean.tabElements}"> > <!-- --> > <!-- EMPTY MENU - NO TAB --> > <!-- --> > <rich:menuItem label="#{msg['menu.item.tab.empty']}" /> > </c:if> > <c:if test="#{not empty desktopTabController.desktopTabBean.tabElements}"> > <!-- --> > <!-- DYNAMIC MENU ITEMS --> > <!-- --> > <c:forEach items="#{desktopTabController.desktopTabBean.tabElements}" > var="tab"> > <c:set var="headerStr" value="#{msg['desktop.tab.List']} > (#{tab.serialNumber})" /> > <rich:menuGroup id="menu-group-#{tab.id}" > label="#{(tab.isModeList == true) ? headerStr : > tab.header}"> > <rich:menuItem label="#{msg['menu.item.tab.activate']}" /> > <rich:menuItem label="#{msg['menu.item.tab.close']}" /> > </rich:menuGroup> > </c:forEach> > </c:if> > </rich:dropDownMenu> > </rich:toolbarGroup> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ richfaces-issues mailing list richfaces-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/richfaces-issues