Struts2中的OptionTransferSelect问题
JSP 中的 optiontransferselect 未填充 doubleList 值。尽管该值作为 iiterator 打印在 JSP 上。
双列表是一个 List
。
<pre><s:optiontransferselect
headerKey="-1"
headerValue="---Please Select---"
doubleHeaderKey="-1"
doubleHeaderValue="---Please Select---"
leftTitle="Availabl"
rightTitle="Selecte"
theme="simple"
name="availableScript"
id="availableScriptId"
list="availableScriptList"
listKey="id"
listValue="name"
size="10"
doubleSize="10"
doubleName="selectedScript"
doubleId="selectedScriptId"
doubleList="selectedScriptList"
doubleListKey="id"
doubleListValue="%{name}"
allowUpDownOnLeft="false"
allowUpDownOnRight="false"
allowSelectAll="false"
allowAddAllToLeft="false"
allowAddAllToRight="false"
/></pre>
不确定问题是什么。我使用的是struts2.0.11
the optiontransferselect in the JSP is not populating the doubleList values. though the value is printed on the JSP as an iiterator .
the double list is a List <Editor>
.
<pre><s:optiontransferselect
headerKey="-1"
headerValue="---Please Select---"
doubleHeaderKey="-1"
doubleHeaderValue="---Please Select---"
leftTitle="Availabl"
rightTitle="Selecte"
theme="simple"
name="availableScript"
id="availableScriptId"
list="availableScriptList"
listKey="id"
listValue="name"
size="10"
doubleSize="10"
doubleName="selectedScript"
doubleId="selectedScriptId"
doubleList="selectedScriptList"
doubleListKey="id"
doubleListValue="%{name}"
allowUpDownOnLeft="false"
allowUpDownOnRight="false"
allowSelectAll="false"
allowAddAllToLeft="false"
allowAddAllToRight="false"
/></pre>
Not sure what the issue is .I am using struts2.0.11
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要将其包含
在 JSP 页面的头部才能使其工作。
You need to include
in the head of the JSP page for this to work.
有人知道如何激活 optiontransferselect 的自动排序选项吗?
我发现,当您单击 trasnfer item Between list 按钮时,会调用此 javascript 函数:
此函数位于属于 struts javascript 库的文件 optiontransferselect.js 中。默认情况下,参数toSort为FALSE,并且s:optiontransferselect组件没有属性可以将此值设置为TRUE。
也许我应该将此 .js 文件更改为我自己的文件。你怎么认为?
谢谢!
Somebody knows how to activate auto sort option for optiontransferselect?
I've found that when you click in trasnfer item between list button this javascript function is onvoked:
This function is located in file optiontransferselect.js who belongs to struts javascript library. By default, argument toSort is FALSE and s:optiontransferselect component doesn't have an attribute to set this value as TRUE.
Maybe I should change this .js file for my own file. What do you think?
Thanks!