1

According to this answer it is as below possible to eliminate that popup while developing mode enabled.

<h:form id="f1" prependId="false" onsubmit="document.getElementById('f1').action='j_security_check';">                      
    ...
</h:form>

But it's not working for me when I add <p:growl>

<h:form id="f1" prependId="false" onsubmit="document.getElementById('f1').action='j_security_check';">                      
    <p:growl id="growl" showDetail="true" sticky="true" />
    ...
</h:form>

How can I solve it?

My config: Wildfly 8, Mojara 2.2.x (server runtime), PrimeFaces 5.3

Community
  • 1
  • 1
rozerro
  • 5,787
  • 9
  • 46
  • 94
  • Is the popup you are referring to the "The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within " pop-up described in the linked question? I don't see any tags in your excerpt that *should* be causing that message; they are all wrapped in `h:form`. Are there any other components on the page not included in your excerpt? – Chatoyancy Mar 27 '16 at 20:41
  • @Chatoyancy the above snippet does not contain any other components except those you see in the question. and that warning message disapears if comment `p:growl` component – rozerro Mar 28 '16 at 06:17

1 Answers1

0

In my case the following solved the problem:

<p:menubar id="pmenubar">
    <p:menuitem value="Inicio" url="${facesContext.externalContext.requestContextPath}/hola.xhtml"
                    icon="ui-icon-home" />
</p:menubar>

I forgot to close this component. As you might have noticed, the component has neither actionListener nor action, so you need to enclose it in a form:

<h:form>
    <p:menubar id="pmenubar">
        <p:menuitem value="Inicio" url="${facesContext.externalContext.requestContextPath}/productos/crear-producto.xhtml"
                    icon="ui-icon-home" />
    </p:menubar>
</h:form>
skuntsel
  • 11,624
  • 11
  • 44
  • 67