2 Replies Latest reply on Oct 25, 2011 2:11 PM by Brian Leathem

    Problem with popupPanel and validate

    Fabio Finocchiaro Newbie

      Hi,

      I'm using a popupPanel with Validate, if I use the

      onclick="#{rich:component('popup')}.hide(); return true;"

      (http://richfaces-showcase.appspot.com/richfaces/component-sample.jsf?demo=popup&sample=modalPopup&skin=blueSky) popupPanel closes even with errors, if I use

       

      http://stackoverflow.com/questions/7232527/problem-with-custom-validator-inside-richpopuppanel

       

      #{facesContext.maximumSeverity.ordinal is always = null

       

      I use RichFaces 4.0, JSF 2.0

       

      <a4j:region>

                  <h:form>

                      <rich:popupPanel id="popupNuovaLinea" modal="true" autosized="true">

      ....

      <a4j:commandButton

                              onclick="#{rich:component('popup')}.hide(); return true;"

                              actionListener="#{UDPRelayer.creaLineaInfo}"

                              render="lineePanel popupNuovaLinea" value="Crea" />

                     </rich:popupPanel>

                </h:form>

      </a4j:region>

       

       

      Help me

       

      thanks

       


        • 1. Re: Problem with popupPanel and validate
          Fabio Finocchiaro Newbie

          The problem is that I use region and form, I used:

           

          <h:form id="idform" autocomplete="off">

                         <a4j:commandLink styleClass="no-decor" render="panelgridNuovaLinea" value="apri"

                              execute="@this" oncomplete="#{rich:component('popupNuovaLinea')}.show()" >                   

                          </a4j:commandLink>

          ...

          </h:form>

           

          <a4j:region>

               <h:forum>

                    <rich:popupPanel id="popupNuovaLinea" modal="true" autosized="true"

                    ....

                    validate

               </h:forum>

          </a4j:region>

           

                     

          the follows code function:


          <h:form id="idform" autocomplete="off">

                         <a4j:commandLink styleClass="no-decor" render="panelgridNuovaLinea" value="apri"

                              execute="@this" oncomplete="#{rich:component('popupNuovaLinea')}.show()" >                   

                          </a4j:commandLink>

          ....

                    <rich:popupPanel id="popupNuovaLinea" modal="true" autosized="true"

                    ....

                    validate

          </h:forum>

          • 2. Re: Problem with popupPanel and validate
            Brian Leathem Master

            Youll have to "attach" the popup panel to the form using the domElementAttachment attribute.