2013-12-19 147 views
1

我要重定向到被称为step2时,我得到一个错误重定向到控制器到另一个PARAM Grails中

这是控制器

def step2(Example exampleInstance) { 
    some code 
} 

一个控制器的动作,这是我赶上了错误

if (errorProp) {    
    redirect(????) 
    return 
} 

我该如何重定向到控制器并通过exampleInstance呢? 我试过t(uri: "/spot/step2"),但我还没有能够通过exampleInstancestep2。我也尝试(action:'step2'.....)但我不能通过这种方式exampleInstance。我该如何处理?

回答

3

使用控制器上的chain method可能会有更好的运气。这样你可以将模型传递给下一个动作。

chain(action: 'step2', model: [exampleInstance: exampleInstance]) 
+2

或者'forward'方法 –

相关问题