Java 如何在Struts中将所选值动态设置为optionCollections
我有一份客户名单和数据库中的国家名单。 然后使用选项Collections将国家/地区列表呈现到国家/地区组合框:Java 如何在Struts中将所选值动态设置为optionCollections,java,default,struts1,Java,Default,Struts1,我有一份客户名单和数据库中的国家名单。 然后使用选项Collections将国家/地区列表呈现到国家/地区组合框: <html:select property="countryCode" name="countries"> <html:optionsCollection name="Cuountry" value="countryCode" label="countryName" /> </html:select> 我想分
<html:select property="countryCode" name="countries">
<html:optionsCollection name="Cuountry" value="countryCode" label="countryName" />
</html:select>
我想分别向所选客户显示countryCombobox的值(从客户列表页面)。
例子:
如果客户A属于Country1,则countryCombobox将显示Country1,以此类推给出的示例几乎正是您所需要的
如果这不是您面临的问题,请在您的问题中详细说明,并添加更多代码