【发布时间】:2014-09-23 08:53:42
【问题描述】:
我在我的 JSF 应用程序中使用 Icefaces 3 双列表组件。一切正常,但尽管使用了属性“rows”,但我无法限制项目的大小。我想有 10 个元素,如果有更多元素,则进行滚动。但是每次我都一致地显示所有项目。
标签文档:http://res.icesoft.org/docs/v3_latest/ace/tld/ace/list.html
XHTML 文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ace="http://www.icefaces.org/icefaces/components">
<h:head></h:head>
<h:body>
<ui:composition template="/pages/layer/layout.xhtml">
<ui:define name="content">
<ice:form id="formList">
<h:panelGroup styleClass="blocContent" layout="block">
<h:panelGroup styleClass="blocButton" layout="block">
<ice:commandButton id="buttonSave" value="#{msg['save']}"
action="#{myBean.doSave}" />
</h:panelGroup>
<ace:panel header="List 1">
<ace:listControl id="selectList" position="TOP"
style="width:60%; margin: 0 auto 0 auto;">
<f:facet name="header">
Header list
</f:facet>
<ace:list id="unassignedElements"
value="#{myBean.unassignedElements}"
styleClass="subList" dropGroup="textGroup"
selectionMode="multiple" rows="10" />
<ace:list id="assignedElements"
value="#{myBean.assignedElements}"
selectionListener="#{myBean.removeAssignedElement}"
styleClass="subList" dropGroup="textGroup"
selectionMode="multiple" rows="10" />
</ace:listControl>
</ace:panel>
</h:panelGroup>
</ice:form>
</ui:define>
</ui:composition>
</h:body>
</html>
【问题讨论】:
标签: jsf icefaces-3