I have two controllers and each one have a flow. In my menu I have a link to the flows. If I'm in flow #1 and click in the link of the flow #2, Grails will show me the view of the flow #1.
The only way I found to make this transition work was to have a link to an action that redirects to the flow.
class FirstController {
def firstFlow = {
}
def toFirst() {
redirect action: 'first'
}
}
class SecondController {
def secondFlow = {
}
def toSecond() {
redirect action: 'second'
}
}
- Going to
/first/first
shows the view correctly. - Going to
/second/second
shows the view of first. - Going to
/second/toSecond
redirects and show the view correctly. - Backing to
/first/first
shows the view of second - Goingo to
/first/toFisrt
shows the view correctly.
Is this a expected behavior? Why the flow don't go to the correct view?
EDIT
The menu is created using Platform Core Navigation API.
navigation = {
app {
first(controller: 'first', action: 'first', title: 'nav.exportar')
second(controller: 'second', action: 'second', title: 'nav.importar')
}
}
Links
http://localhost:8080/my-application/first/first?execution=e14s1
http://localhost:8080/my-application/second/second?execution=e14s1