2014-09-23 55 views
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> 

回答