0

I am developing a simple project in JDeveloper. In the jsff page I have a button which should execute a specific action only if the result from the action listener of the button is true. Please take a look at the code:

<af:button text="Save" id="b1" action="finish"
           actionListener="#{pageFlowScope.saveDate.isValid}">

For example, if the return value of #{pageFlowScope.saveDate.isValid} is true, then execute action="finish", otherwise do nothing.

Thanks!

K. H.
  • 185
  • 1
  • 3
  • 19

1 Answers1

0

You can throw special exception in action listener - AbortProcessingException. Doing so you inform jsf not to call remaining action listeners/actions.

See this answer for more details.

Community
  • 1
  • 1
BlindNW
  • 315
  • 2
  • 10