2013-12-19 74 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'方法 –

相關問題