0
我在我的JSF應用程序中使用了Icefaces 3雙列表組件。一切工作正常,但我不能限制項目的大小,儘管使用屬性「行」。我想有10個元素,如果還有更多元素,請進行滾動。但每次我將所有項目一致顯示。在Icefaces ace:list組件中沒有考慮屬性「行」
標籤文檔: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>