Jsp 如何编辑由<;显示的记录;显示:表格>;?

Jsp 如何编辑由<;显示的记录;显示:表格>;?,jsp,struts2,displaytag,Jsp,Struts2,Displaytag,我有下面的代码来在表中显示我的结果,我想知道如何更改它以编辑记录 我想编辑记录并根据特定列进行排序,目前我可以对它们进行排序,但我不知道如何编辑它们 <display:table id="txt" name="employees" requesturi="" pagesize="10" cellpadding="2px;" cellspacing="2px;" style="margin-left:450px;margin-top:20px;"> <display:column

我有下面的代码来在表中显示我的结果,我想知道如何更改它以编辑记录

我想编辑记录并根据特定列进行排序,目前我可以对它们进行排序,但我不知道如何编辑它们

<display:table id="txt" name="employees" requesturi="" pagesize="10" cellpadding="2px;" cellspacing="2px;" style="margin-left:450px;margin-top:20px;">
<display:column property="employeeCode" title="Employee Code" sortable="true"></display:column>
<display:column property="employeeName" title="Employee Name" sortable="true"></display:column>
<display:column property="department" title="Department" sortable="true"></display:column>
<display:column property="salary" title="Salary" sortable="true"></display:column>
</display:table>

我也发现了下面的代码,但我想知道是否有其他方法来解决这个问题


例如,将列从

<display:column property="employeeName" title="Employee Name" sortable="true">
</display:column>

差不多

<display:column title="Employee Name" sortable="true">
    <s:textfield name="employeeName" value="%{#attr.txt.employeeName}" />
</display:column>

单击编辑链接或按钮时,您可以将单行数据发送到javascript函数,然后打开弹出窗口显示数据,用户可以编辑数据

<display:table id="table1">
    <display:column title="Edit">
        <a href="#" onclick="sendData('${table1.emp_Name}')">Edit</a>
    </display:column>
</display:table>


谢谢,但这样我应该有一个提交btn来提交包含所有字段的表单,对吗?抱歉,问题中没有提到你想逐行编辑(每行有一个按钮?通过AJAX、通过GET或通过POST?)。既然你已经开始了,不妨看看比displaytag更新的东西。displaytag是基于你过去10年的问题而设计的:。投反对票的是什么?