Struts1 中以下 select 标记代码的等效 Struts2 代码是什么
What will be equivalent Struts2 code for the following select tag code in Struts1
我是 Struts 的新手。我必须将代码形式 Struts1 迁移到 Struts2,但在 Struts2 的 select 标记中感到困惑。请帮助编写 Struts2 中的等效代码。
<nested:select property="pmt_type0" onchange="openTable(this,0)">
<html:option value=""></html:option>
<html:optionsCollection name="paymentTypesList" label="paymentTypeDescription" value="paymentTypeCode"/>
</nested:select>
应该是这样的:
<s:select name="pmt_type0"
list="paymentTypesList"
listKey="paymentTypeCode"
listValue="paymentTypeDescription"
emptyOption="true"
onchange="openTable(this,0)" />
其中 paymentTypesList
是具有 paymentTypeCode
和 paymentTypeDescription
属性的对象列表。
要了解更多信息,请查看 Struts2 tags。
我是 Struts 的新手。我必须将代码形式 Struts1 迁移到 Struts2,但在 Struts2 的 select 标记中感到困惑。请帮助编写 Struts2 中的等效代码。
<nested:select property="pmt_type0" onchange="openTable(this,0)">
<html:option value=""></html:option>
<html:optionsCollection name="paymentTypesList" label="paymentTypeDescription" value="paymentTypeCode"/>
</nested:select>
应该是这样的:
<s:select name="pmt_type0"
list="paymentTypesList"
listKey="paymentTypeCode"
listValue="paymentTypeDescription"
emptyOption="true"
onchange="openTable(this,0)" />
其中 paymentTypesList
是具有 paymentTypeCode
和 paymentTypeDescription
属性的对象列表。
要了解更多信息,请查看 Struts2 tags。