Page 1 of 1

The button/link/text component needs to have a Form....

Posted: 18 Apr 2017, 17:18
by marcelocaser
Hello,
I'm using the theme "Poseidon" and I'm putting the following code in the file "template.xhtml"

Code: Select all


.....

<h:body styleClass="main-body">

        <div class="layout-wrapper #{guestPreferences.menuLayout}">
            <ui:include src="./topbar.xhtml" />
            <ui:include src="./menu.xhtml" />

            <div class="layout-main">
            
            <p:growl id="growl" showDetail="true" showSummary="true" sticky="false" autoUpdate="true" />
            
            ....
            
</h:body>

But you always get the error message:
The button/link/text component needs to have a Form in its ancestry. Please add <h:form>.
I already put inside a <h: form> tag but it did not solve! I need <p: grow /> to be in my entire layout!

Re: The button/link/text component needs to have a Form....

Posted: 20 Apr 2017, 08:36
by mert.sincan
Please add the following context-param or change it in web.xml;

Code: Select all

<context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Production</param-value>
</context-param>

Re: The button/link/text component needs to have a Form....

Posted: 24 Apr 2017, 03:08
by marcelocaser
Hi!
Thank you! It worked!!

Re: The button/link/text component needs to have a Form....

Posted: 25 Apr 2017, 07:08
by mert.sincan
Glad to hear, thanks for the update!