0
我在JSP中使用顯示標記創建表,並且我使用裝飾器來顯示最後一列(Action
),它是我的動作類的鏈接。獲取顯示值:表列到動作類struts2
<display:table id='listDisplay' name='detailsList' list='detailsList' requestURI="" cellpadding="0" cellspacing="0" decorator="com.abc.RecBackupDetailsDecorator">
<display:column title="Rule Name" property="rulename"></display:column>
<display:column title="Campaign" property="campname"></display:column>
<display:column title="Dispositions" property="dispositions"></display:column>
<display:column title="Backup Server" property="backupserver"></display:column>
<display:column title="Backup Directory" property="backupdir"></display:column>
<display:column title="Frequency" property="frequency"></display:column>
<display:column title="Added On" property="addedon"></display:column>
<display:column title="Last Run Date" property="lastrundate"></display:column>
<display:column title="Status" property="status"></display:column>
<display:column title="Action" property="editDetails"></display:column>
</display:table>
裝飾類:
public class RecBackupDetailsDecorator extends TableDecorator {
public String getEditDetails() {
System.out.println("Index of List : " + getViewIndex());
String editDetails = "<a href='editDetailsRecBackupConf.action' class='editDetails'>Edit</a>";
return editDetails;
}
}
現在,當我點擊編輯,我想在我的動作類的方法(editDetailsRecBackupConf
)顯示錶中的列值,但不知道如何我可以在我的行動類中獲得這些值嗎?