2 Replies Latest reply on Sep 9, 2008 4:56 PM by Joseph Nusairat

    Handling errors on page flows

    Joseph Nusairat Newbie

      Ok maybe i am just missing it here.

      I am trying to create a fairly simple page flow definition. And i am using page flows because it could eventually get more complicated based on a substance.

      But how do i handle error validations?

      <page name="loader-information" view-id="/loadCollection.xhtml">
       <transition name="next" to="substances-load">
       <action expression="#{loadConfigSvc.saveLoadConfig()}"/>
       </transition>
       <transition name="cancel" to="cancel"></transition>
      </page>
      

      So i have that saveLoadConfig can return a boolean false if it fails to validate and saves a message ot the facesmessages.

      Well ... when i run it it naturally goes to the next page.

      I know i can handle global exceptions for it in the pages code, but really i just want it to go back on itself and redisplay the same page. Can i use rules with the actions? Like we do in pages.xml?

      Or do i need to make a decision node instead?