blackuprise
blackuprise

Reputation: 450

Navigate to previous page from grails controller?

Is there a way to navigate previous page from grails Controller and pass model to be rendered, for example I'm having page and want to navigate user/register and to revert to the previous url if there are errors in form?

currently I'm having

def register = {
 ...
    return [user : user]
}

Thanks, Mika

Upvotes: 1

Views: 1188

Answers (1)

Dónal
Dónal

Reputation: 187379

It looks like you're writing a webflowenter image description here

Webflows are really the only game in town if you need to manage non-persistent state across multiple pages. Fortunately, webflow provides built-in support for your requirement - going back to the form page if validation fails.

Upvotes: 2

Related Questions