Results 1 to 2 of 2

Thread: SWF - JSF - confirm dialog before leaving a flow

  1. #1
    Join Date
    May 2012
    Posts
    1

    Default SWF - JSF - confirm dialog before leaving a flow

    I need to implement a feature that allows me to go ahead and terminate/or stay in the current flow depending on what the user selects in a confirm dialog.

    We have a webflow to create a new order that consists of 5 steps.
    If for example the user is filling in step 3 of 5 and he clicks a link on the page that starts a new flow(any action that terminates the active flow), we want to give him a confirm dialog that says something like "are you sure you want to leave the current order registration, all data will be lost".

    If he clicks yes, he will continue to the new flow, if he says no, he will stay in the current.

    Is it possible to do something like this? I was looking into writing a custom FlowExecutionListener, but I don't think this is the right approach.

    Thank you.

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    If he clicks yes, he will continue to the new flow, if he says no, he will stay in the current.
    Where he could do click?, You could consider use Javascript to show the prompt message, then go to a end-state clear the object(s) and then start a new flow.
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •