Struts2的method="{1}"解释
来源:互联网 发布:云播 软件 编辑:程序博客网 时间:2024/06/06 17:45
这里的{1}表示接收前面action里通过通配符传来的值,例如你配置的是<action name="*Crud" class="example.Crud" method="{1}"> ,然后调用***/editCrud.action,则method里获得的值是edit,将会调用这个action里面的 edit方法
附:
Action中的方法通配符
有些时候对Action中方法的调用满足一定的规律,例如edit Action对应edit方法,delete Action对应 delete方法,这个时候我们可以使用方法通配符,例如:
<action name="*Crud" class="example.Crud" method="{1}"> 这时,editCrud Action的引用将调用edit方法,同理,deleteCrud Action的引用将调用delete 方法。
另外一种比较常用的方式是使用下划线分割,例如:
<action name="Crud_*" class="example.Crud" method="{1}">
这样当遇到如下调用的时候可以找到对应的方法。
"action=Crud_input" => input方法
"action=Crud_delete" => delete方法
通配符和普通的配置具有相同的地位,可以结合使用框架的所有其他功能。
- Struts2的method="{1}"解释
- struts2的method="{1}"
- struts2的method="{1}"
- struts2的method="{1}"
- struts2的method="{1}"
- [Struts2]struts2的关于method=“{1}"意思详解
- [Struts2]struts2的关于method=“{1}"意思详解
- Struts2的method{1}用法
- struts2的关于method=“{1}"意思详解
- struts2的关于method=“{1}"意思详解
- struts2的method执行
- 【struts2】中method={1}详解
- struts2配置文件中method="{1}"详解
- struts2配置文件中的method={1}详解
- Struts2配置文件中使用通配符收藏method="{1}"
- struts2 配置action的method属性
- struts2中action 中method的作用。
- Struts2 type="chain"的用法详细解释
- 不错
- ExtJS Panel(引用页)刷新问题
- 关于C# 中的Attribute 特性
- va_list
- oralce--常用系统视图或表
- Struts2的method="{1}"解释
- Objective-c 的Immutable copy 和 Deep copy.
- regulator(转)
- ELF (Excutable and Linkable Format) 介绍1
- Android 利用发送Intent播放视频文件
- 开创BT2.0时代
- 变态下载的未来
- VS2008 测试版,现在评估期已到,把它转成正式版的方法
- oracle数据库简单查询(jsp版)