Using activeOnViewIds attribute on commandNavigation2
causes children items to be not rendered when should be (parent is clicked)
if parent action points to current page (same with activeOnViewIds)
ex (replaced "go_panelnavigation_1" with "go_panelnavigation_5" on
panelnavigation_5.jsp tomahawk sample page) :
<body>
<f:view>
<f:loadBundle
basename="org.apache.myfaces.examples.resource.example_messages"
var="example_messages"/>
<t:div id="subnavigation_outer">
<t:div id="subnavigation">
<h:form>
<t:panelNavigation2 id="nav1" layout="list"
itemClass="mypage" activeItemClass="selected"
openItemClass="selected">
<t:commandNavigation2
value="#{example_messages['panelnav_products']}"
action="go_panelnavigation_5">
<t:commandNavigation2
action="#{navigationMenu.getAction1}"
actionListener="#{navigationMenu.actionListener}">
<f:verbatim>› </f:verbatim>
<t:outputText
value="#{example_messages['panelnav_serach1']}"/>
</t:commandNavigation2>
<t:commandNavigation2
actionListener="#{navigationMenu.actionListener}">
<f:verbatim>› </f:verbatim>
<t:outputText
value="#{example_messages['panelnav_serach_acc1']}"/>
</t:commandNavigation2>
<t:commandNavigation2 action="go_panelnavigation_5"
actionListener="#{navigationMenu.actionListener}">
<f:verbatim>› </f:verbatim>
<t:outputText
value="#{example_messages['panelnav_search_adv1']}"/>
</t:commandNavigation2>
</t:commandNavigation2>
<t:commandNavigation2
value="#{example_messages['panelnav_shop']}" action="go_panelnavigation_5"
actionListener="#{navigationMenu.actionListener}"/>
<t:commandNavigation2
value="#{example_messages['panelnav_corporate']}" target="new"
action="go_panelnavigation_5"
actionListener="#{navigationMenu.actionListener}"
activeOnViewIds="/panelnavigation_5.jsp"><!-- comma separated list of
viewIds
-->
<t:commandNavigation2 action="go_panelnavigation_5">
<f:verbatim>› </f:verbatim>
<t:outputText
value="#{example_messages['panelnav_news1']}"/>
</t:commandNavigation2>
<t:commandNavigation2 action="go_panelnavigation_5"
actionListener="#{navigationMenu.actionListener}">
<f:verbatim>› </f:verbatim>
<t:outputText
value="#{example_messages['panelnav_investor1']}"/>
</t:commandNavigation2>
</t:commandNavigation2>
<t:commandNavigation2
value="#{example_messages['panelnav_contact']}"
action="go_panelnavigation_5"
actionListener="#{navigationMenu.actionListener}"/>
</t:panelNavigation2>
<f:verbatim><br/></f:verbatim>
<t:panelNavigation2 id="nav2" layout="list"
styleClass="mypage">
<t:commandNavigation2 value="MyAccount"
action="go_panelnavigation_5">
<t:commandNavigation2 action="go_panelnavigation_5">
<f:verbatim>› </f:verbatim>
<t:outputText value="Login"/>
</t:commandNavigation2>
<t:commandNavigation2 action="go_panelnavigation_5">
<f:verbatim>› </f:verbatim>
<t:outputText value="Register"/>
</t:commandNavigation2>
</t:commandNavigation2>
</t:panelNavigation2>
</h:form>
</t:div>
</t:div>
<jsp:include page="inc/mbean_source.jsp"/>
</f:view>
<%@ include file="inc/page_footer.jsp" %>
</body>
</html>