display tag 中设置连接的问题
我想要在display tag标签库生成的表中添加一个链接 ,链接中的参数要使用propertylai 获取
代码: <display:table name= "list " pagesize= "10 " requestURI= "/commentServlet ">
<display:column style= "width:80px " maxLength= "200 " property= "id " title= "评论编号 " />
<display:column style= "width:80px " property= "blog_id " title= "博客编号 " />
<display:column style= "width:80px " property= "username " title= "评论人 " />
<display:column style= "width:480px height:4px " property= "content " title= "内容 " />
<display:column value= "dede " title= "操作 " url= "/commentServlet?method=delete&id= " paramId= "id " paramName= "Comment " paramProperty= "id " > </display:column>
</display:table>
---------------------------------------------------
java bean:
import java.util.Date;
public class Comment {
private String username;
private String content;
private Date createdtime;
private String id;
private String blog_id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getBlog_id() {
return blog_id;
}
public void setBlog_id(String blog_id) {
this.blog_id = blog_id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Date getCreatedtime() {
return createdtime;
}
public void setCreatedtime(Date createdtime) {
this.createdtime = createdtime;
}
}
我在网上看见有人说要paramid,paramName,paramProerty一起使用,可是我使用后能生成参数id,但是获取不到id的值,这是为什么呢
------解决方案--------------------
没用的,你要实现复合连接,也就是要携带两个以上参数,通过paramId是无法实现的,一般是这样
HTML code
<display:column href="getInfoCustom.action" paramId="customUser.cuserId" paramProperty="cuserId"
title="客户信息" style="text-align:center">查看</display:column>