0 Replies Latest reply on Jan 21, 2007 12:48 PM by Pawel Kaczor

    Booking example - missing validation

    Pawel Kaczor Newbie

      After user sets booking details and applies changes, the undergoing validation is performed but the result of validation is not checked before redirecting to confirmation page

      Existing navigation code:

      <page view-id="/book.xhtml" >
      
       <navigation from-action="#{hotelBooking.setBookingDetails}">
       <redirect view-id="/confirm.xhtml"/>
       </navigation>
      </page>


      Navigation rule should be added:

      <page view-id="/book.xhtml" >
      
       <navigation from-action="#{hotelBooking.setBookingDetails}">
       <rule if="#{hotelBooking.bookingValid}">
       <redirect view-id="/confirm.xhtml"/>
       </rule>
       </navigation>
      </page>


      Cheers,
      Pawel Kaczor