changes.
| h2. Overview |
| _Since 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. |
| | The _ace:listControl_ component renders a set of controls for moving items among ace:list components. It requires a selector that defines the set of ace:list components to move items between. Defaults to all lists. Optionally if this component has two nested ace:list children, they will be rendered within a styled container, and connected via this control without configuration. |
| |
 |  | {tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=listBean] of this component, complete with source code.{tip} |
| | {tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=ace:listControl] of this component, complete with source code.{tip} |
| |
| |
| h2. Getting Started |
 |  | |
| In most cases, it's enough to add the tag on the page without any configuration. |
| |
| {panel} |
| {code:xml|borderStyle=dashed}<html ... xmlns:ace="http://www.icefaces.org/icefaces/components"> |
 |  | <h:body class="ice-skin-rime"> |
| | <h:body> |
| <h:form> |
 |  | <ace:list value="#{listBean.itemList}" selections="#{listBean.selections}" selectionMode="multiple"/> |
| | <ace:listControl id="listControl"> |
| <f:facet name="header"> |
| Multi List Header |
| </f:facet> |
| </ace:listControl> |
| <ace:list .../> |
| <ace:list .../> |
| <ace:list .../> |
| </h:form> |
| </h:body> |
| </html> |
| {code} |
| {panel} |
| |
| h2. Attributes |
| |
 |  | {tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://www.icefaces.org/docs/v4_latest/ace/tld/ace/list.html].{tip} |
| | {tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://res.icesoft.org/docs/v4_latest/ace/tld/ace/listControl.html].{tip} |
| {panel} |
 |  | *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. |
| | *selector:* JQuery/CSS selector defining the group of lists this control navigates and creates mutually exclusive selection between. Default selects all lists. When in dual list mode, this property has no effect. Default = '.if-list'. |
| {panel} |
| {panel} |
 |  | *selections:* A set (typically started empty) to contain the list of values that have been selected. |
| | *position:* When dual list mode is used, this property will determine if we render the migration control in the "MIDDLE", on the "TOP", "BOTTOM" or "BOTH" ends of the nested lists. "ALL" renders controls in every position Default = 'DualListPosition.TOP'. |
| {panel} |
| {panel} |
 |  | *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. |
| | *format:* Defines the order that the movement controls appear in. Default = 'alll lft rgt allr'. |
| {panel} |
 |  | {panel} |
| *dragging:* Boolean value that specifies whether to enable dragging elements within the list. Defaults to true. |
| {panel} |
| | |
| h2. Client Behavior Events |
| |
 |  | | *Name* | *Description* | |
| | select | Fired when an item is clicked & selected in the List. | |
| | deselect | Fired when an item is clicked & deselected in the List. | |
| | move | Fired when an item is moved within the List. | |
| | migrate | Fired when an item is migrated to this List. | |
| | None. |
| |
| h2. Javascript API |
| |
| h4. ICEfaces 3.x |
| |
| The client side component object is exposed through the global variable name specified in the *widgetVar* attribute. |
| |
| h4. 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. |
| |
| {code}var widget = ice.ace.instance('frm:componentId);{code} |
| |
| {tip}The _ice.ace.instance_ function requires the _full_ client id of the component to be specified, such as "j_idt77:componentId" instead of just "componentId". To reduce the complexity of working with complete IDs with this function it may be preferable in some cases to use {{prependId="false"}} in the enclosing form (e.g. _<h:form prependId="false">_).{tip} |
| |
| {info}This component doesn't have a client-side API made specifically to be used by application developers. However, the component's internal methods and variables can be accessed in this way, including the underlying jQuery object and objects from underlying Javascript libraries (if applicable), and can be used for whatever purpose a developer might have in mind. |
| {info} |
 |  | h2. CSS Classes |
| |
 |  | The following markup represents the basic HTML structure of the component and the CSS classes it uses. |
| |
| {code:xml} |
| <!-- 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> |
| {code} |
| |
| h2. Keyboard and ARIA Support |
| |
| Not supported at the moment. |
| |
| h2. Known Issues |
| |
 | | None, at the moment. |
| | None at the moment. |