struts2 动态工作流
话不多说,直接贴代码:
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>posted on 2017-07-16 21:31 cynchanpin 阅读(200) 评论(0) 收藏 举报
浙公网安备 33010602011771号