1 Reply Latest reply on Oct 31, 2008 6:48 PM by deanhiller2000

    bypassing updates on form submit?

    deanhiller2000

      We have a form for creating questions, but when the user changes the question type, we want to change from yesnoquestion.xhtml to fillintheblankquestion.xhtml.  This means we also want to bypass validation but keep the data.  Right now, when the user changes the pulldown, we call click() method on the commandButton which runs it through validation and may fail if there is missing data not filled in.  I would rather bypass validation BUT update the model and continue to the next page so the next page has common fields filled in.  Is there a way to do such a thing?


      thanks,
      Dean

        • 1. Re: bypassing updates on form submit?
          deanhiller2000

          By the way, this is my code using immediate which does not work...




               <h:commandButton id="changeType" value="Change Question Type"
                    action="#{pathActions.setupPaths()}" immediate="true"
                    />
          
               <s:decorate id="typeDec"
                    template="../../../web/zlogin/errorTemplate.xhtml">
                    <ui:define name="label">Question Type:</ui:define>
                    <h:selectOneMenu value="#{pathActions.type}" required="true"
                         immediate="true">
                         <s:selectItems value="#{textTypes}" var="type"
                              label="#{type.label}"/>
                         <s:convertEnum />
                    </h:selectOneMenu>
               </s:decorate>



          I put debug points in pathActions.type and setupPaths.  The debugger only stops at setupPaths and never applies the pathActions.type.  I also have a pages.xml that calls a method to get the next view based on the pathActions.type, BUT that is never called either.  I have no idea how to get this to work so I can change the xhtml page without validation.