开发者

Dynamic links with displaytag

<display:table id="row" name="userList" requestURI="">
    <display:column href="user.do?action=view&user=${row.id}" class="details">Details</display:column>
</display:t开发者_运维技巧able>

I'm trying to send to the user.do servlet a query like action=view&user=23. The method posted here passes as row.id just the id from the first user in the list. Even though I have 5 users and I press Details for the last one, it still passes the id of the first user.

I have the EL active.

What is the correct approach for this issue?


I'm no expert but did you map your list with the id in your controller? something like this.....

Account acct = null;

String selectedID = (String)request.getAttribute("targetID");

if (selectedID != null) {

acct.setUserList(userListDAO.getUserList.getId());

}else {

logger.error(" List is null" +selectedID);

}

where target ID points to another attribute which is set to the user ID.... as I said I'm no expert but I'm just trying to give in my 2 cents....

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜