@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 ...
随机推荐
- Linux 驱动面试题总结【转】
本文转载自:http://zkread.com/article/872291.html 1. Linux设备中字符设备与块设备有什么主要的区别?请分别列举一些实际的设备说出它们是属于哪一类设备. 字符 ...
- POJ2406 Power Strings —— KMP or 后缀数组 最小循环节
题目链接:https://vjudge.net/problem/POJ-2406 Power Strings Time Limit: 3000MS Memory Limit: 65536K Tot ...
- Zookeeper集群搭建安装
三台 Linux虚拟机,每台都需要安装Jdk环境 1.上传Zookeeper安装包 (比较大 直接上传得了) 或者:wget https://mirrors.tuna.tsinghua.edu.cn/ ...
- valid No such filter: 'drawtext'"
libfreetype is missing. You'll have to rebuild FFmpeg with this library or disable overlays. --enabl ...
- codeforces C. Cows and Sequence 解题报告
题目链接:http://codeforces.com/problemset/problem/284/C 题目意思:给出3种操作:t = 1:在前 a 个数中每个数都加上x: t= 2:在数组末尾增加一 ...
- socket即时聊天
服务端 package com.luhan.text; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Gri ...
- 随应潮流-基于ABP+Angularjs现代化应用软件开发框架(1)-总体介绍
系列文章目录 随应潮流-基于ABP+Angulsrjs现代化应用软件开发框架(1)-总体说明 随应潮流-基于ABP+Angulsrjs现代化应用软件开发框架(2)-abp说明 随应潮流-基于ABP+A ...
- tkinter.py
from tkinter import * def hello():print('hello world') win=Tk() win.title('hello tkinter') win.geome ...
- java虚拟机内存溢出和泄漏实例
测试参数设置: 1.循环调用new A()实现堆溢出,java.lang.OutOfMemoryError: Java heap space, 虚拟机参数:-Xms1M -Xmx1M -XX:+Hea ...
- 初学Java(一)
基本语法: 编写Java程序时,应注意以下几点: 1.大小写敏感:java是大小写敏感的,这就意味着标识符Hello与hello是不同的. 2.类名:对于所有的类来说,类名的首字母应该大写.如果类名由 ...