Daniel T.
Daniel T.

Reputation: 38390

How do I end a Grails webflow if the user clicks on a link that's not in the webflow?

I have a Grails application with a common navigation bar that shows on all pages. When the user starts a webflow, it will change the URL to look like this:

http://localhost:8080/app/transaction/create?execution=e5s1

But when I click to a link that's not in the webflow, it will still append the querystring:

http://localhost:8080/app/profile/show/5?execution=e5s1

How do I configure Grails to not append the querystring if the link is not part of the webflow?

Upvotes: 0

Views: 198

Answers (1)

Tri
Tri

Reputation: 528

I don't think this is possible if you're using the createLink taglib to generate your link. The only workaround I can see is to call an action then redirect to the final url destination. Something like...

In GSP:

createLink(action: "proxy", params: [finalaction: 'gohere'])

In Controller:

def proxy = {
    redirect(action: params.finalaction)
}

def gohere = {
    render "look no querystring"
}

Upvotes: 1

Related Questions