我的JSP中有以下代码。
<s:form method="post" action="fetchFpfDataAction" enctype="multipart/form-data">
<s:textfield name="batchID" key="batchID" size="20" />
<display:table id="fpfErrorTable" name="fpfErrorList" pagesize="5" cellpadding="5px;"
cellspacing="5px;" style="margin-left:50px;margin-top:20px;" uid="row" requestURI="">
<display:column title="Row Number">
<s:property value="#attr.row_rowNum"/>
</display:column>
<display:column property="batchNr" title="Batch Number"/>
<display:column property="extnlRefNr" title="Claim Number"/>
<display:column property="respMsgTx" title="Error Message"/>
<display:column>
<s:radio name="fpfErrorList[%{#attr.row_rowNum - 1}].errorType" list="errorTypes" value="%{#attr.fpfErrorTable.errorType}" theme="simple"></s:radio>
</display:column>
</display:table>
<s:submit value="FetchFPFData" align="center" theme="simple" />
<s:submit value="UpdateFPFData" align="center" action="updateFpfDataAction" theme="simple"/>
</s:form>
我可以选择单选按钮选项,我可以在Action类调试语句中看到我的选择,但在再次加载相同的JSP时,单选按钮显示没有任何选择。
public String updateFpfData() {
if(fpfErrorList != null && fpfErrorList.size() > 0) {
for (FileProcessingRecordBean fpfError :fpfErrorList) {
System.out.println("Claim Number "+fpfError.getExtnlRefNr());
System.out.println("Error Type "+fpfError.getErrorType());
}
}
return SUCCESS;
struts.xml中
<action name="fetchFpfDataAction"
class="fetchFpfDataAction">
<interceptor-ref name="loggingStack"></interceptor-ref>
<result name="success" type="tiles">
/fpf.tiles
</result>
<result name="input" type="tiles">/fpf.tiles</result>
</action>
<action name="updateFpfDataAction"
class="fetchFpfDataAction" method="updateFpfData">
<interceptor-ref name="loggingStack"></interceptor-ref>
<result name="success" type="tiles">
/fpf.tiles
</result>
<result name="input" type="tiles">/fpf.tiles</result>
</action>