2 Replies Latest reply on Nov 25, 2006 11:32 PM by ellenzhao

    back and cancel button on a pages containing input field

    ellenzhao

      My pageflow diagram is shown below. All the "next" buttons on the pages work well but I have a question for the back and cancel button (on the page, but not brower's back button). When there is a page containing input fields, after the clicking the back or cancel button, the validation of the input fields still happened. I had to input some dummy values in order to go back or cancel. This is not natural and how can I go back and cancel immediately without validation? The pageflow is managed by a jpdl file:

      <pageflow-definition name="roomBookingFlow">
       <start-state name="start">
       <transition to="preference" />
       </start-state>
      
       <page name="preference" view-id="/reservations/preferences.xhtml">
       <redirect />
       <transition name="pricing" to="checkAvailability">
       <action expression="#{roomBooking.doPricing}" />
       </transition>
       <transition name="cancel" to="cancelPage" />
       </page>
      
       <decision name="checkAvailability"
       expression="#{roomBooking.roomAvailable}">
       <transition name="true" to="checkLoggedIn" />
       <transition name="false" to="preference"/>
       </decision>
      
       <decision name="checkLoggedIn" expression="#{login.loggedIn}">
       <transition name="true" to="payment" />
       <transition name="false" to="loginPage" />
       </decision>
      
       <page name="loginPage" view-id="/login.xhtml">
       <transition name="login" to="payment">
       <action expression="#{login.login}" />
       </transition>
       <transition name="newguest" to="payment">
       <action expression="#{register.startEdit}" />
       </transition>
       <transition name="back" to="preference" />
       <transition name="cancel" to="cancelPage" />
       </page>
      
      
       <page name="payment" view-id="/reservations/payment.xhtml"
       no-conversation-view-id="/reservations/preferences.xhtml">
       <redirect />
       <transition name="next" to="checkPayment" />
       <transition name="back" to="preference" />
       <transition name="cancel" to="cancelPage" />
       </page>
      
       <decision name="checkPayment"
       expression="#{roomBooking.validPayment}">
       <transition name="true" to="review" />
       <transition name="false" to="payment" />
       </decision>
      
       <page name="review" view-id="/reservations/review-details.xhtml"
       no-conversation-view-id="/reservations/preferences.xhtml">
       <redirect />
       <transition name="book" to="confirmation">
       <action expression="#{roomBooking.bookRoom}" />
       </transition>
       <transition name="back" to="payment" />
       <transition name="cancel" to="cancelPage" />
       </page>
      
       <page name="confirmation" view-id="/reservations/complete.xhtml"
       no-conversation-view-id="/reservations/preferences.xhtml">
       <redirect />
       <end-conversation />
       </page>
      
       <page name="cancelPage" view-id="/home.xhtml"
       no-conversation-view-id="/home.xhtml">
       <redirect />
       <end-conversation />
       </page>
      
      </pageflow-definition>


      The diagram is here:
      [img]http://www.ningning.org/images/reservation-pageflow-cropped.png[/img]

      Any enlightenment would be highly appreciated!


      Regards,
      Ellen