Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 560429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:20:33+00:00 2026-05-13T12:20:33+00:00

I am trying to transition to next state of a WebFlow using Ajax requests.

  • 0

I am trying to transition to next state of a WebFlow using Ajax requests. But it stays in the same state and returns the GSP as response for that state while I am expecting the GSP for the next state.

Following is the WebFlow code:

def gettingStartedAjaxFlow = {      
        flow1 {
            on("next") {                
                println "flow1"
            }.to("flow2")
            on("skip").to("flow2")
        }

        flow2 {
            on("next") {
                println "flow2"
            }.to("flow3")
            on("skip").to("flow3")
        }

        flow3 {         
            on("next"){             
                println "flow3"
            }.to("finish")
            on("skip").to("finish")

            finish {
                redirect(action:"index")
            }
        }
}

Following is the Ajax call I am making for the state transition:

$.ajax({
            type: "POST",
            url: "/UN/user/gettingStartedAjax",
            success: function(data) {
                $("#wizardDiv").html(data);
            }
});

The GSPs for each state (flow1, flow2, flow3) contains a a code fragment having remoteForm & required next and skip submit buttons to transition to next state and as a result update the “wizardDiv” div. Following is the GSP fragment for flow1 state:

<g:formRemote name="flow1Form" url="[controller:'user', action:'gettingStartedAjax']" update="wizardDiv">
    <p>You are in flow 1</p>
    <g:submitButton name="next" value="Next Flow" />
    <g:submitButton name="skip" value="Skip Flow" />    
</g:formRemote>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:20:33+00:00Added an answer on May 13, 2026 at 12:20 pm

    As well as keeping track of the execution (as Daxon posted), you’ll need to make sure your buttons are named _eventId_next and _eventId_skip. g:submitbutton is normally clever enough to do this for you but it might not be inside of a remoteForm.

    Also, my web flow code uses the parameter execution, not flowExecutionKey – which version of Grails are you using?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to splice an image and then have a transition to next one
I'm trying to pass post data from one page to the next but PreviousPage
I am trying to make dropdown enabling using jquery and click search then that
I'm trying to add page transitions. The fadeIn transition is done using the WebFont
I am trying to transition content with a @keyframes animation when loading and unloading
I am a Java programmer trying to transition to C# and I'm hoping there's
I'm trying to create a transition between two scenes, this is a dumbed down
I'm trying to do a transition from MySQL to SQLite for a small site.
I'm trying to accomplish a transition effect if you will. On doc ready div
I'm trying to create a fade in/out transition between page navigations with an implementation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.