struts2 动态工作流
时间:2014-06-22 22:29:18
收藏:0
阅读:198
话不多说,直接贴代码:
public class TestAction {
private String nextPage;//保存下一步内容的属性
public String destroy(){
if(user.dontConfirm()){//决定下一步
nextPage = LIST_PAGE;
}else{
nextPage = CONFIRM_PAGE;
}
return DESTROY;
}
public String getNextPage(){//用于动作映射工作流的方法
return nextPage;
}
}
<action name="TestAction_*" method="{1}" class="TestAction">
<result name="destroy">${nextPage}</result>
</action>
评论(0)