My second problem is this:
I have a menubar (menuBar.xhtml) as a composite component. I call it from a newUser (newUser.xhtml) page.
The newUser page has a panelGrid with inputText and inputSecret fields. If this panelGrid's inputText and inputSecret fields have f:validateLength tags, then the Logout menuitem in menubar (logout action) does not work.
How do I get around this?
Code: Select all
menuBar.xhtml
--------------
<h:body>
<cc:interface>
</cc:interface>
<cc:implementation>
<hr/>
<p:menubar>
<p:submenu>
<f:facet name="label">
<p:menuitem value="Logout" action="#{logoutBean.logout}"/>
</f:facet>
</p:submenu>
</p:menubar>
<hr/>
</cc:implementation>
</h:body>
newUser.xhtml
------------
<h:body>
<h:form>
<r:menuBar/>
<h:panelGrid columns="3" border="0" cellpadding="5" cellspacing="3" headerClass="login-heading">
<f:facet name="header">
<h:outputText value="Create User" />
</f:facet>
<h:messages globalOnly="true" styleClass="errors"/>
<h:panelGroup/>
<h:panelGroup/>
<h:outputLabel for="useridInput">
<h:outputText value="Id : "/>
</h:outputLabel>
<h:inputText id="useridInput" size="20" maxlength="30" value="#{newUserBkBean.id}">
<!-- <f:validateLength minimum="5" maximum="30"/> -->
</h:inputText>
<!-- <h:message for="useridInput"/> -->
Thanks
-- MH