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 8315683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:11:17+00:00 2026-06-08T21:11:17+00:00

I have question regarding redirection in Grails web-flow. I am in a view state

  • 0

I have question regarding redirection in Grails web-flow.
I am in a view state which will allow users to enter the answers for a question. On 2 wrong attempts I should be able to re-direct the user to view page from different controller. What i mean is

challengeQuestionOne{
            onRender() {
                //Display question
            }
            on('next') {BuildQuestion command ->
                bindData(flow.recovery,command)
                [return the model to flow]
                if(command.hasErrors()) {
                    flow.command = command
                    return error()
                }
                if(check for status. If doesnot pass){
                    flash.message=message(code:'loginForm.account.locked', default: 'Please Contact Admin.')
                    redirect(controller : "login",action: "login")//how to redirect from here to diff controller
                }                    
                if (//compare answer entered) {

                }
                else{
                   //set status not active
                }

            }.to("challengeQuestionTwo")
            on(Exception).to("error")
            on('cancel').to('finish')                
        }

I have tried to redirect from onRender . It was redirecting to the page. But how do I display the error msg on the redirected page. How can i forward the error message from one controller to other??

  • 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-06-08T21:11:18+00:00Added an answer on June 8, 2026 at 9:11 pm

    Ivo Houbrechts wrote an excelent tutorial about grails webflow:

    Webflow defines its own flash scope. Although it has the same semantics as the standard grails flash scope (the main purpose is to store objects only until after the next request), it is a different scope. This means that objects stored in webflow’s flash scope are not visible in standard grails actions.

    import org.springframework.web.context.request.RequestContextHolder
    ....
    RequestContextHolder.currentRequestAttributes().flashScope.message = "YourMessage"
    

    You can read more here:

    http://livesnippets.cloudfoundry.com/docs/guide/

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

Sidebar

Related Questions

I have a small question regarding rails. I have a search controller which searches
Have a question regarding something which has been bugging me for some time now.I'm
I have question regarding the service and activity. I have one service which calls
I have a question regarding inheritance, so I will describe the scenario below: I
I have a question regarding a session variable. I have session variable which needs
I would have question regarding web services. Let's say I have webservice client that
I have a question regarding vectors: If I have a std::vector<MyClass> will this vector
I have question regarding the SQLAlchemy. How can I add into my mapped class
I have question regarding the use of function parameters. In the past I have
I have question regarding disabling browser caching. I have already found few solutions, and

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.