【问题标题】:how can I get information in rich:pickList?如何获取rich:pickList 中的信息?
【发布时间】:2012-10-09 03:21:26
【问题描述】:

我按照richfaces 中的示例创建了我的rich:pickList http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=pickList&skin=blueSky

我的问题是选定列表中没有信息显示。那我怎么才能得到呢?

My Edit.xhtml file:
<rich:pickList value="#{controller.selectedStudent}" var="f" sourceCaption="Available" targetCaption="Selected" listWidth="195px" listHeight="100px" orderable="true">
    <f:selectItems value="#{controller.studentList}" var="test" itemValue="#{test}" itemLabel="#{test.name}" />
</rich:pickList>

【问题讨论】:

    标签: jsf-2 richfaces


    【解决方案1】:

    我认为这是来自 Richfaces 选择列表的错误,因为所选项目(右)必须与左选择列表中的对象相同

    1. 创建 2 个列表:左选择列表和右选择列表。
    2. 在左选择列表中找到元素并将其放入右选择列表中。

    【讨论】:

    • 这不是最直观的实现,但假设所选项目是可用项目的子集是有意义的,也许在这种情况下组件有点太聪明并且违反了最小原则惊喜。
    猜你喜欢
    • 1970-01-01
    • 2021-10-07
    • 2012-04-04
    • 2020-09-07
    • 1970-01-01
    • 2019-07-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多