给定以下折叠菜单 (p:panelMenu):
<p:panelMenu style="width:200px">
<p:submenu label="#{uimsg.clm_title}" styleClass="pageFont">
<!-- <p:menuitem value="Delete" actionListener="#{buttonBean.delete}" ajax="true" icon="ui-icon-close"/> -->
</p:submenu>
<p:separator />
<!-- Sub-menu master Data -->
<p:submenu label="#{uimsg.trsf_title}" styleClass="pageFont">
<p:menuitem value="#{uimsg.trsf_create}" ajax="true"
icon="ui-icon-arrow-1-e" url="/transfers/editTransfer.xhtml" />
</p:submenu>
<p:separator />
<!-- Sub-menu master Data -->
<p:submenu label="#{uimsg.mst_data_title}" styleClass="pageFont">
<!-- Clubs -->
<p:submenu label="#{uimsg.mst_data_club_title}">
<p:menuitem value="#{uimsg.mst_data_show_club_title}" ajax="true"
icon="ui-icon-arrow-1-e" url="/clubs/showClubs.xhtml" />
<p:menuitem value="#{uimsg.mst_data_edit_club_title}" ajax="true"
icon="ui-icon-arrow-1-e" url="/clubs/editClub.xhtml" />
</p:submenu>
<!-- Associations -->
<p:submenu label="#{uimsg.mst_data_assocation_title}">
<p:menuitem value="#{uimsg.mst_data_show_association_title}"
ajax="true" icon="ui-icon-arrow-1-e"
url="/associations/showAssociations.xhtml" />
<p:menuitem value="#{uimsg.mst_data_edit_association_title}"
ajax="true" icon="ui-icon-arrow-1-e"
url="/associations/editAssociation.xhtml" />
</p:submenu>
<!-- leagues -->
<p:submenu label="#{uimsg.mst_data_league_title}">
<p:menuitem value="#{uimsg.mst_data_show_league_title}"
icon="ui-icon-arrow-1-e" url="/league/showLeagues.xhtml" ajax="true"/>
<p:menuitem value="#{uimsg.mst_data_edit_league_title}"
icon="ui-icon-arrow-1-e" url="/league/editLeague.xhtml" ajax="true"/>
</p:submenu>
<!-- Players -->
<p:submenu label="#{uimsg.mst_data_player_title}">
<p:menuitem value="#{uimsg.player_menu_show}" ajax="true"
icon="ui-icon-arrow-1-e" url="/player/showPlayers.xhtml" />
<p:menuitem value="#{uimsg.player_menu_edit}" ajax="true"
icon="ui-icon-arrow-1-e" url="/player/editPlayer.xhtml" />
</p:submenu>
<!-- Confederation -->
<p:submenu label="#{uimsg.mst_data_confed_title}">
<p:menuitem value="#{uimsg.mst_data_edit_confed_title}"
icon="ui-icon-arrow-1-e"
url="/confederations/showConfederations.xhtml" ajax="true" />
<p:menuitem value="#{uimsg.mst_data_show_confed_title}"
icon="ui-icon-arrow-1-e"
url="/confederations/editConfederation.xhtml" ajax="true" />
</p:submenu>
</p:submenu>
<p:separator />
<!-- Sub-menu Administration -->
<p:submenu label="#{uimsg.admin_title}"
rendered="#{auth.showAdministration() == true ? true : false }"
id="adminDivId" styleClass="pageFont">
<!-- User menu -->
<p:submenu label="#{uimsg.users_admin_title}">
<p:menuitem value="#{uimsg.admin_show_users_title}" ajax="true"
icon="ui-icon-arrow-1-e" url="/users/showUsers.xhtml" />
<p:menuitem value="#{uimsg.admin_edit_users_title}" ajax="true"
icon="ui-icon-arrow-1-e" url="/users/editUser.xhtml"
disabled="#{auth.editUsers() == true ? false : true }" />
</p:submenu>
<!-- Role menu -->
<p:submenu label="#{uimsg.roles_admin_title}">
<p:menuitem value="#{uimsg.admin_show_role_title}" ajax="true"
icon="ui-icon-arrow-1-e" url="/roles/showRoles.xhtml" />
<p:menuitem value="#{uimsg.admin_edit_role_title}" ajax="true"
icon="ui-icon-arrow-1-e" url="/roles/editRole.xhtml"
disabled="#{auth.editUsers() ne true}" />
</p:submenu>
</p:submenu>
<p:separator />
<!-- Sub-menu Version -->
<p:submenu label="#{uimsg.abt_software_title}" styleClass="pageFont">
<p:menuitem value="#{uimsg.abt_software_show_informations}"
icon="ui-icon-arrow-1-e" url="/version/showVersion.xhtml" ajax="true"/>
</p:submenu>
</p:panelMenu>
每次单击 menuItem 时,PanelMenu 的行为都非常奇怪且不可预测:一些 subMenu 折叠,而另一些则没有。这个“jabbi-jabba”似乎没有固定的规则。
我不知道这是什么原因。我主要在所有视图中使用重定向(“faces-redirect=true”),一些视图包含复合元素
有人有提示吗?
环境:
- AS:JBoss 7.1.1 最终版
- JSF 版本:2.1.13
- 素面:3.4.1