1
我有一个选择必须使用String列表填充其选项。选项值和文本将等于。Struts2 - 如何使用String列表填充选择标签?
我知道我正在发送清单,因为选择渲染一些元素等于列表的大小。
<s:select name="status" list="status" headerKey="" headerValue="-- Select --" id="status" listKey="" listValue="" />
会发生什么情况是,期权没有价值和文本渲染,因为我没有一个关于我应该是指在Struts2的taglib的选择标签的listKey
和listValue
属性什么头绪。
在操作的方法:
public List<String> getStatus() {
return Arrays.asList("Active", "Inactive");
}
工作就像一个魅力。 –