2 Replies Latest reply on Dec 15, 2011 12:32 PM by gothicoil

    rich:toggleControl inside a4j:commandButton problem

    gothicoil

      Hi guys, I have a problem in the component <rich:toggleControl>:

      I have:
      [code]
      <f:facet name="informacao">
      <ui:include src="/myPage.xhtml">
      <ui:param name="prev" value="prev"/>
      <ui:param name="next" value="next"/>
      </ ui: include>
      </ f: facet>
      [/ code]


      And my include

       

      [code]

       

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

            xmlns:ui="http://java.sun.com/jsf/facelets"

            xmlns:h="http://java.sun.com/jsf/html"

            xmlns:f="http://java.sun.com/jsf/core"

            xmlns:a4j="http://richfaces.org/a4j"

            xmlns:rich="http://richfaces.org/rich">

          <f:subview>

              <a4j:keepAlive beanName="mypageMB" />

              <h:form id="form1" style="margin:0px;text-align:left">

                  <rich:spacer width="10px" height="8px"/>

                      <table cellpadding="3" cellspacing="0" border="0" width="980px">

       

                          <tr>

                              <td width="150px" class="labelColumn">

                                  <h:outputText value="${b['comum.name']}" styleClass="label" />

                              </td>

                              <td width="650px" colspan="3">

                                  <h:inputText styleClass="inputTexto" id="txtNAme" style="width:450px;" label="${b['comum.name']}" maxlength="120"

                                      value="#{mypageMB.name}"  required="true"/>

                              </td>

                          </tr>

                      </table>

                  <div id="wizardFooter" align="center">

                      <rich:separator height="3" />

                      <h:panelGrid columns="2">

                          <rich:toggleControl for="wizardInclusaoPedagogica" switchToState="#{voltar}">

                          <a4j:commandButton id="btNext"

                                            action="#{mypageMB.doNExtPage}"

                                             value="${b['comum.next']}"

                                             title="${b['comum.next']}"

                                             reRender="msgsErros, form1, wizardMenu"

                                             styleClass="button" reRender="wizardMenu"/>

                          </rich:toggleControl>

                      </h:panelGrid>

                  </div>

                  </h:form>

              </f:subview>

      </ui:composition>

      [/code]

       

      However my <h:inputText> is required, my rich: toggleContro is sending to the next page, MOTR requeired errors in it and in fact I would like the errors that were shown on the same page, let them go to the next page everything is valid only when