struts2中的select标签 map['test'] 是什么含义?

newcomer1983 2009-01-08 10:23:49
看到一个例子的时候看到这样一个用法
<s:select list="map['test']"
map['test']代表什么?
...全文
368 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
newfristuser 2009-01-09
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 yzsunlight 的回复:]
估计是对应的action 中有一个叫 map的属性 里有一个 key为 test的元素
[/Quote]
支持一楼的说法
mizukusa 2009-01-09
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 lzc_job 的回复:]
map 变量中test元素
[/Quote]
是这样的,也就是map的key
lzc_job 2009-01-08
  • 打赏
  • 举报
回复
map 变量中test元素
yzsunlight 2009-01-08
  • 打赏
  • 举报
回复
估计是对应的action 中有一个叫 map的属性 里有一个 key为 test的元素
spring的良好的扩展性,集成度,IOC,AOP事务,已经是项目的基础条件. 整个项目只使用了spring 没有struts,没有hibernate //就极简而言,一个数据库只需要一个Service,就可以查询这个数据库的任意一张表 //以下是我的测试用例 //@Test 查询基本类型 public void testObject() throws Exception{ Finder finder=new Finder("select id from [Users] where 1=1 "); finder.append("and userId=:userId").setParam("userId", 6); Integer id = baseFangService.queryForObject(finder, Integer.class); System.out.println(id); } //@Test 查询日期 public void testObjectDate() throws Exception{ Finder finder=new Finder("select cteateTime from Users where id=6 order by id"); Date id = baseFangService.queryForObject(finder, Date.class); System.out.println(id); } //@Test 查询一个对象 public void testObjectUser() throws Exception{ Finder finder=new Finder("select * from Users where id=6 order by id"); Users u = baseFangService.queryForObject(finder, Users.class); System.out.println(u.getName()); } //@Test 查询分页 public void testMsSql() throws Exception{ Finder finder=new Finder("select * from Users order by id"); List list = baseFangService.queryForList(finder, Users.class, new Page(2)); System.out.println(list.size()); for(Users s:list){ System.out.println(s.getName()); } } //@Test 调用数据库存储过程 public void testProc() throws Exception{ Finder finder=new Finder(); finder.setParam("unitId", 0); finder.setProcName("proc_up"); Map queryObjectByProc = (Map) baseFangService.queryObjectByProc(finder); System.out.println(queryObjectByProc.get("#update-count-10")); } //@Test 调用数据库函数 public void testFunction() throws Exception{ Finder finder=new Finder(); finder.setFunName("fun_userId"); finder.setParam("userId", 6); String userName= baseFangService.queryForObjectByByFunction(finder,String.class); System.out.println(userName); }

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧