How to pass values in JavaScript Function in Display tag in Struts

自作多情 提交于 2019-12-06 15:35:28

You should add uid attribute to the table.

<display:table export="false"  id="data" uid="row"
            name="helpdeskTickets"  
            requestURI="/dofetchassignedtickets.action" pagesize="5" >

Then use OGNL

viewTicketDetail('<s:property value="%{#attr.row.yourAttribute}"/>');

or using EL

viewTicketDetail('${row.yourAttribute}');

using column

<display:column title="Action">
    <a href="javascript:viewTicketDetail('<s:property value="%{#attr.row.id}"/>');"><img src="<s:url value='/images/ViewDetails.png'/>" /></a>
</display:column>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!