我正在使用下拉选项集合来选择一组值。
<html:select property="cddSourceOfFunds" styleId="cddSourceOfFunds" styleClass="selectDefault" onchange="return mtmrsValRequiredselect(this.id,'selectDefault','selectDefault errorBdr','errorSpan1','0')">
<logic:present name="sourceOfFundsList" scope="request">
<html:option value="0">
<bean:message key="mtmrs.validation.select" />
</html:option>
<html:optionsCollection name="sourceOfFundsList" label="value"
value="value" />
</logic:present>
<logic:notPresent name="sourceOfFundsList" scope="request">
<html:option value="0">
<bean:message key="mtmrs.validation.select" />
</html:option>
</logic:notPresent>
我将 cddSourceOfFunds 的值设置为 action 表单并返回到 jsp。但是下拉列表仍然显示没有发送数据.. 即“选择”作为默认值。但是,我可以使用在表单中写入属性值
<bean:write name = "/remittanceTransactionCdd" property ="cddSourceOfFunds" />
我希望下拉菜单在加载时显示我从操作方法设置的默认值。属性值在表单中。但无法在下拉列表中显示。我该如何实现它。帮助赞赏。