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>
struts2 动态工作流的更多相关文章
- Struts2 动态调用方法
struts2动态调用方法有两种方式 方式一:用通配符进行调用: Action方法: package com.bjyinfu.struts.actions; public class CatchDyn ...
- struts2动态调用+Servlet过滤器+struts2拦截器
周末真的是懒到心慌...... 本文是在完整s2sh项目基础上添加的,不太了解s2sh项目构建的朋友可以先参考一下这几篇文章: eclipse环境下基于tomcat-7.0.82构建struts2项目 ...
- Struts2 动态方法调用
01.Struts 2基本结构 使用Struts2框架实现用登录的功能,使用struts2标签和ognl表达式简化了试图的开发,并且利用struts2提供的特性对输入的数据进行验证,以及访问Servl ...
- Struts2 动态结果和带参数的跳转
完整代码:Struts16ActionResultsDemo.rar 1.动态结果. 有时我们需要在Action里取得我个要转跳的页面 看一下我们的struts.xml <?xml versio ...
- struts2动态方法
动态方法调用 在Struts2中动态方法调用有三种方式,动态方法调用就是为了解决一个Action对应多个请求的处理,以免Action太多 第一种方式:指定method属性 这种方式我们前面已经用到过, ...
- struts2 动态Action
1.java 2.struts.xml struts2.5,默认关闭动态Action,着色的是开启和使用动态action 3.JSP 小结:访问时,用!后跟方法名的方法,方法返回值----->r ...
- Struts2动态方法调用(DMI)
当structs.xml解析到Action的时候,默认执行的是此action的execute()方法,但是实际开发中,我们的action中含有很多方法,比如说增删改查的方法,那么structs.xml ...
- Struts2动态结果(${})and全局结果(global-results)
动态结果 例:根据判定动态结果区分用户进行登录 1.先在TestAction类中进行判定赋值 public class TestAction extends ActionSupport { priva ...
- Struts2动态调用DMI及错误解决方法
在Strust2中action可以定义自己的方法,调用方法有两种方式,一种方式是struts.xml中指定method来表示需要用到的方法, 但是这种方法缺点在于如果你的Action中有很多方法则要多 ...
随机推荐
- (转)SpringMVC学习(十)——SpringMVC与前台的json数据交互
http://blog.csdn.net/yerenyuan_pku/article/details/72514022 json数据格式在接口调用中.html页面中比较常用,json格式比较简单,解析 ...
- react中的jsx详细理解
这是官网上的一个简单的例子 const name = 'Josh Perez'; const element = <h1>Hello, {name}</h1>; ReactDO ...
- vscode 用户代码片段 vue初始化模板 Snippet #新加入开头注释 自动生成文件名 开发日期时间等内容
vue文件模板 模板变量 https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables vue.json { // ...
- 一篇文章搞懂高级程序员、架构师、技术总监、CTO从薪资到技能的区别
一篇文章搞懂高级程序员.架构师.技术总监.CTO从薪资到技能的区别 http://youzhixueyuan.com/senior-programmers-architects-technical-d ...
- Java集合(六)--ArrayList、LinkedList和Vector对比
在前两篇博客,学习了ArrayList和LinkedList的源码,地址在这: Java集合(五)--LinkedList源码解读 Java集合(四)--基于JDK1.8的ArrayList源码解读 ...
- 硬盘写入 iso
https://www.jb51.net/softjc/508796.html WinImage 正确操作是要有两个or以上-硬盘. 这样才能写入你要装的操作系统 测试或者安装
- zabbix auto registration
1./etc/zabbix/zabbix_agent.conf serverActive=zabbix server ip 2.frontend configuration>actions> ...
- composer 设置代理
在命令行终端中输入以下内容: export https_proxy='192.168.1.133:1080' export http_proxy='192.168.1.133:1080' 此前提是你已 ...
- Ubuntu 开机出现 "Your system is running in low-graphics mode"
Ubuntu 开机出现 "Your system is running in low-graphics mode" 可能是权限问题 按网上的方法发现sudo命令无法使用,且系统变为 ...
- 条款23:宁一 non-member no-friend 替换member函数(prefer non-member non-friend functions to members functions)
NOTE : 1.宁可拿non-member non-friend 函数替换member函数.这样做可以增加封装性/包裹单性(packaging flexibility)和机能扩展性.