displaytag多个参数获取问题在线等待
我在学习中碰到这样一个问题,想求助于各位高人。
<display:table name="sessionscope.details">
<display:column property="id" title="id"
href="contract.do?method=listcontract" paramid="id" paramproperty="id"/>
<display:column property="email" />
<display:column property="status" />
</display:table>
此处只传入了一个参数(id),怎么在执行listcontract方法时,同时传入显示出来的两个参数,如同时传入id 和email的值??
求救!
------解决方案--------------------Using a decorator
public String getLink1()
{
ListObject lObject= (ListObject)getCurrentRowObject();
int lIndex= getListIndex();
return "\<a href=\"details.jsp?index=" + lIndex + "\"\>" + lObject.getId() + "\</a\>";
}
public String getLink2()
{
ListObject lObject= (ListObject)getCurrentRowObject();
int lId= lObject.getId();
return "\<a href=\"details.jsp?id=" + lId + "&action=view\">View</a> | "
+ "<a href=\"details.jsp?id=" + lId + "&action=edit\">Edit\</a> | "
+ "\<a href=\"details.jsp?id=" + lId + "&action=delete\">Delete\</a>";
}
<display:table name="sessionScope.details" decorator="org.displaytag.sample.Wrapper" >
<display:column property="link1" title="ID" />
<display:column property="email" />
<display:column property="link2" title="Actions" />
</display:table>
看看自带的文档吧