@Results( 中 params 怎么用
http://blog.csdn.net/z69183787/article/details/16342553
struts2的@Result annotation 如何添加params,并且在页面取值
1、action跳转至jsp
后台:(需有get set 方法)
- @SuppressWarnings("rawtypes")
- @Action(value="/loadFileList",results={
- @Result(name="attachList",location="/attach/attachList.jsp",params={"attachMemo1","${attachMemo1}"}),
- @Result(name="attachList1",location="/attach/attachList1.jsp"),
- @Result(name="attachListHT",location="/attach/attachListHT.jsp")})
前台:
- <%out.println(request.getAttribute("attachMemo1")); %>
2、action跳转至action
后台:(stptuser为 action中的bo)
- @Action(value="stptUserUpdate",results={
- @Result(name="stptUserEdited",params={"actionName","stptUserView","stptUserId","%{stptUser.id}"},type="redirectAction")
- })
或者
- @Result(name="success",
- type="redirectAction",
- location="d-list",
- params={"id", "%{id}"}
- )
另一个action获取
- @Action(value="stptUserView",results={
- @Result(name="success",location="/userManage/stptUserView.jsp")
- })
- public String stptUserView(){
- String id = StringUtil.getNotNullValueString(super.getServletRequest().getParameter("stptUserId"));
- this.stptUser = this.stptUserService.findStptUserById(Long.parseLong(id));
- List<ManagerVo> list = this.stptUserService.getUserInfo(id);
- List<ManagerVo> agentList = this.stptUserService.getAgentInfo(id);
- super.getServletRequest().setAttribute("voList", list);
- super.getServletRequest().setAttribute("agentList", agentList);
- return SUCCESS;
- }
@Results( 中 params 怎么用的更多相关文章
- rails中params[:id]与params["id"]分析
写这个帖子的缘由是因为在页面参数传到rails的controller时用params[:]和params[""]都可以取到值: [1] pry(#<BooksControll ...
- 【原】vue-router中params和query的区别
1.引入方式不同 query要用path来引入 this.$router.push({ path: 'test', query: { type: 2, detail: '哈哈' } }) params ...
- c#中params关键字应用
c#params应用 params 是C#开发语言中关键字, params主要的用处是在给函数传参数的时候用,就是当函数的参数不固定的时候. 在方法声明中的 params 关键字之后不允许任何其他参数 ...
- vue中params & query的比较
共同点: 1.都可以传值 2.在另外一个组件中传递值的时候,都是放在$route中 不同点: 1.传值时候,url的表现不一样 query /orderInfo?xxx=yyy&aaa=bbb ...
- C#中params使用
1.参数被params修饰即为可变参数,params只能修饰一维数组. 2.给可变参数赋值的时候,可以直接传递数组的元素. 3.在调用的时候,会自动将这些元素封装为一个数组,并将数组传递. 4.可变参 ...
- get请求中params参数的使用
一.当发送一个get请求的时候,如果有参数,那么参数应该怎么处理呢? 比如,百度阅读里面,查询书的列表,点击进去,它是一个get请求,地址是:https://yuedu.baidu.com/book/ ...
- struts2的@Result annotation 如何添加params,并且在页面取值
http://www.bubuko.com/infodetail-2492575.html .............................................. 标签:lai ...
- 记录python接口自动化测试--从excel中读取params参数传入requests请求不生效问题的解决过程(第七目)
在第六目把主函数写好了,先来运行一下主函数 从截图中可以看到,请求参数打印出来了,和excel中填写的一致 但是每个接口的返回值却都是400,提示参数没有传进去,开始不知道是什么原因(因为excel中 ...
- ArcGIS API for JavaScript 中的数据类型【vs】GPServer的数据类型
熟悉GPServer的同学肯定知道,GPServer在10.1的ArcMap后需要执行成功一次才能发布. 发布GPServer,可以是ArcMap的工具箱的工具,也可以是自己写的模型. 不管是ArcM ...
随机推荐
- require实现单页应用程序(SPA)
写了一个测试代码,用require.js配合它的一个插件text.js实现了最简单的单页应用程序,简单的记录一下,方便以后复习, git地址:https://github.com/lily1010/r ...
- LightOJ1336 Sigma Function —— 质因子分解、约数和为偶数
题目链接:https://vjudge.net/problem/LightOJ-1336 1336 - Sigma Function PDF (English) Statistics Forum ...
- 记录下 hubot相关
适配器工厂https://hubot.github.com/docs/adapters/ 自己写适配器https://hubot.github.com/docs/adapters/developmen ...
- CentOS系统文件和目录管理相关的一些重要命令
我们都知道,在Linux系统中,基本上任何我们需要做的事都可以通过输入命令来完成,所以在Linux系统中命令非常的多,我们不可能也没必要记住所有的这些命令,但是对于一些常用的命令我们还是必须要对其了如 ...
- 配置react+webpack+es6中的一些教训
1.要用es6,因为目前浏览器的支持情况,那么肯定需要插件将e6的代码转换成es5,我用的是babel-loader,事实证明使用6.x版本似乎是不行的,我换成5.3.2之后就成功了. 2.webpa ...
- 机器学习: 特征脸算法 EigenFaces
人脸识别是机器学习和机器视觉领域非常重要的一个研究方向,而特征脸算法是人脸识别里非常经典的一个算法,EigenFaces 是基于PCA (principal component analysis) 即 ...
- Unable to resolve target 'android-16'
Just now when I imported the "android-support-v7-appcompat" to ADT,the console pointed out ...
- Vue.js style(内联样式)
Vue.js style(内联样式) 我们可以在 v-bind:style 直接设置样式: <div id="app"> <div v-bind:style=&q ...
- easy_install 和 pip
原文章:http://blog.csdn.net/xsj_blog/article/details/52037609 easy_install 和 pip的介绍: easy_install和pip都是 ...
- World is Exploding
题意: 给出一个长为n的序列A,问有多少四元组(a, b, c, d)满足$a \ne b \ne c \ne d, 1 \leq a < b \leq n, 1 \leq c < d \ ...