首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

struts2 url传接参数给action中Model.value的属性

2011-12-05 
struts2 url传递参数给action中Model.value的属性?如何用url链接 URL herf传递参数给action中的model的

struts2 url传递参数给action中Model.value的属性?
如何用url链接 'URL herf'传递参数给action中的model的属性如model.value

比如:
public class myAction{
 private Page page;
}
这个是Model的pojo类
public class Page{
public int index;
public int next;
}

my struts tag is :我的struts标签是这样的
<s:url id="url" action="myAction!list.action">
<s:param name="page.index">
12</s:param>
</s:url>

<s:a href="%{url}">Index Page</s:a>这个链接生成的url是
.action?page.index=12,
这个不能设置page.index的值呀?怎么办???
can't set model value "page.index" in myAction

How shall I do wiht this?

[解决办法]
s: 是自定义标签? 我也是新手,互相学习下
[解决办法]
<html:link page="/phoneInfo.do?method=sales" paramId="id" paramName="item" paramProperty="handsetInfo.id">
<bean:write name="item" property="handsetInfo.brand"/> 
</html:link>

热点排行