OverviewSince 3.1 The ace:list component is a powerful method of displaying data, providing a dynamically alterable list of the information given to it, to be controlled either by dragging or via the ace:listControl component.
Getting Started<html ... xmlns:ace="http://www.icefaces.org/icefaces/components"> <h:body class="ice-skin-rime"> <h:form> <ace:list value="#{listBean.itemList}" selections="#{listBean.selections}" selectionMode="multiple"/> </h:form> </h:body> </html> Attributes
value: An array of data that you wish to use for the list components. Each entry in the array will get its own cell in the list. selections: A set (typically started empty) to contain the list of values that have been selected. selectionMode: How the list allows selection of elements. 'single' allows one element to be selected at once, 'multiple' enables shift/control key presses to select more than one at a time. Anything else defaults to 'null' and does not allow any selections whatsoever. dragging: Boolean value that specifies whether to enable dragging elements within the list. Defaults to true. Client Behavior Events
Javascript APIICEfaces 3.xThe client side component object is exposed through the global variable name specified in the widgetVar attribute. ICEfaces 4+The "widgetVar" attribute on the ACE components has been removed in ICEfaces 4 and in its place a new "ice.ace.instance()" client JavaScript object lookup API has been introduced. The reason for this change is to enable lazy-initialization of the ACE component JavaScript objects to improve runtime performance and reduce browser memory use. var widget = ice.ace.instance('frm:componentId);
Other Tips
CSS ClassesThe following markup represents the basic HTML structure of the component and the CSS classes it uses. <!-- Root container --> <div class="[user defined classes] ui-widget-content ui-corner-all if-list-dl-cnt ui-widget" style="[user defined styles]"> <!-- Header --> <div class="ui-state-default if-list-nctrl-head"> Dual List Header </div> <div class="if-list-nctrls"> <!-- Move all left button --> <span class="if-list-ctrl-spcr"> <span class="if-list-nctrl-alll ui-state-default ui-corner-all if-list-nctrl"> <span class="ui-icon ui-icon-arrowstop-1-w"></span> </span> </span> <!-- Move left button --> <span class="if-list-ctrl-spcr"> <span class="if-list-nctrl-lft ui-state-default ui-corner-all if-list-nctrl"> <span class="ui-icon ui-icon-arrow-1-w"></span> </span> </span> <!-- Move right button --> <span class="if-list-ctrl-spcr"> <span class="if-list-nctrl-rgt ui-state-default ui-corner-all if-list-nctrl"> <span class="ui-icon ui-icon-arrow-1-e"></span> </span> </span> <!-- Move all right button --> <span class="if-list-ctrl-spcr"> <span class="if-list-nctrl-allr ui-state-default ui-corner-all if-list-nctrl"> <span class="ui-icon ui-icon-arrowstop-1-e"></span> </span> </span> </div> <div class="if-list-dl"> <!-- Left list --> <span class="if-list-dl-1"> <div> <div class="subList <user defined classes> if-list ui-widget ui-widget-content ui-corner-all" style="<user defined styles>"> <ul class="if-list-body dg-textGroup ui-sortable"> <li class="if-list-item ui-state-default if-pntr">List item label</li> </ul> </div> </div> </span> <!-- Right list --> <span class="if-list-dl-2"> <div> <div class="subList <user defined classes> if-list ui-widget ui-widget-content ui-corner-all" style="<user defined styles>"> <ul class="if-list-body dg-textGroup ui-sortable"> <li class="if-list-item ui-state-default if-pntr">List item label</li> </ul> </div> </div> </span> </div> <!-- Footer --> <div class="ui-widget-content if-list-nctrl-foot"> Dual List Footer </div> </div> |
List
© Copyright 2021 ICEsoft Technologies Canada Corp.