Reputation: 3816
I am Using primefaces and Jsf with glassfish when i try to execute this code
<p:menubar autoSubmenuDisplay="true" effect="slide">
<p:submenu label="File" icon="ui-icon ui-icon-gear">
<p:menuitem value="Logout" url="#" />
</p:submenu>
<p:submenu label="Goto" icon="ui-icon ui-icon-gear">
<p:menuitem value="Enhancement Catalog" action="#{adminControlBean.eAMChat}" id="submit1" ajax="false" />
<p:menuitem value="Proceed to Chat" action="#{adminControlBean.enhancementCatalog}" id="submit2" />
<p:menuitem value="Customer Maintanence" action="#{adminControlBean.customerMaintanance}" id="submit3" />
<p:menuitem value="Moderator Maintanence" action="#{adminControlBean.moderatorMaintanance}" id="submit4" />
<p:menuitem value="Chat Protocols" action="#{adminControlBean.chatProtocalMaintanance}" id="submit5" ajax="false" />
</p:submenu>
<p:submenu label="Edit" icon="ui-icon ui-icon-gear">
<p:menuitem value="Change Password" action="#{password.submitAction}" id="submit" />
</p:submenu>
</p:menubar>
I am getting warning message as
The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within
<h:form>
Please let me know where i made a mistake
Upvotes: 1
Views: 8023
Reputation: 1
You need to enclose the form components, like inputtext, checkbox, inputhidden, etc. into a form tag. The "Production" param value only hidden the warning, is not a fix.
Upvotes: -1
Reputation: 4003
well based on the link mentioned above a user suggested to change this:
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
to:
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
Hope this helps...it just gets rid of the message here, although the underlying problem is within PF implementation as the discussion there seems to imply.
Upvotes: 5
Reputation: 184
This seems to be a bug in the JSF 2.1 implementation.
Se this primefaces issue for details
Upvotes: 1