【发布时间】:2011-12-20 15:44:11
【问题描述】:
我希望用户在单击恢复按钮后被带到上次访问的页面。我正在将 id 传递给控制器。
<input type="button" value="Resume" onclick="window.location.href='/wizard/submission/resume/${submission.id}'" />
控制器逻辑如下
def resume = {
def id = params.id
def test = (getDomainObjectType() as Class).get(id)
session[getSessionObjectName()] = test;
LOG.debug("resuming ${test}")
redirect(action: "wizard");
}
向导逻辑如下:(目前为止)
nextView = (int) postProcessedValues.next;
if (nextView == null) {
redirect(action: "index");
//nextView = 0; //question is what to do here. Maybe redirect back to the index page instead...
}
帮我实现这里的逻辑。
【问题讨论】:
-
如果您需要我的其他代码,请告诉我...