2 Replies Latest reply on Apr 7, 2013 6:17 AM by Swamy Nathan

    richfaces wizard + <rich:graphValidator/>

    Swamy Nathan Newbie




      Am trying to use a richfaces wizard using the approach given in http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=togglePanel&sample=wizard&skin=blueSky

      This works nicely - using <rich:togglePanel/>, <rich:togglePanelItem/>, <a4j:commandButton/> and <rich:toggleControl/>

      In one of the wizard pages (<rich:togglePanelItem/>) I need to perform a custom validation. Am trying to do this using <rich:graphValidator/> as described in http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=graphValidator&skin=blueSky

      Somehow am finding that the <rich:graphValidator/> works as long as my <a4j:commandButton/> does not embed a <rich:toggleControl/>.

      Have tried playing with render also.


      Am assuming someone will have a proper solution to get this working or should I try a different approach?





      Snippet am having trouble getting to work:-



      <rich:graphValidator value="#{key1}" id="mdgv">

                 <rich:messages for="mdgv" />

                      <rich:messages globalOnly="true" />

                <h:panelGrid columns="3">


                  <h:outputText  value="Property name:  " />



                  <rich:inplaceInput id="property1" value="#{key1.property1}" required="true"  defaultLabel="click to enter property" />

               <rich:message for="property1" />

                <h:outputText  value="Model Type" />









                          <div class="navPanel" style="width: 100%;">

                                    <a4j:commandButton  action="#{key1.changePage}" render="nextButton" style="float:right" value="Next &gt;&gt;"



                                              <rich:toggleControl id="toggleControlId" targetItem="panel2" event="click" />




        • 1. Re: richfaces wizard + <rich:graphValidator/>
          Swamy Nathan Newbie

          It looks like expected behaviour not working properly.

          Is there any way to not use <rich:toggleControl/> but get same behaviour by invoking a ajax callback javascript function?

          • 2. Re: richfaces wizard + <rich:graphValidator/>
            Swamy Nathan Newbie

            Got it working by removing the



            Then using this:


            <a4j:commandButton oncomplete="someFunc();" render="nextpage" style="float:right" value="Next1 &gt;&gt;"


              <h:inputText  value="#{key.page2}" immediate="true" id="nextpage"  />



            <SCRIPT type="text/javascript">

            function someFunc()


                      var nextpageName=document.getElementById('nextpage').value;






            It all works if <rich:togglePanel /> hasswitchType="client"