Overview | Library | Tag | Help
| FRAMES NO FRAMES

## ICEfaces EE Composite Components
Tag autoSortTable

## Auto-Sort Table Composite Component

### Features

- The Auto-Sort Table can be used with any List
- No code is required to sort
- Sorting is done automatically
- A Data Pager can be automatically included

### How to Use

1. Create an instance of the AutoSortTableBean class in your managed bean
2. Add the autoSortTable tag to your page
3. Set the 'id' attribute on the tag
4. Add an ice-cc:column tag for each column you would like to show in the table
5. Bind the 'value' attribute of the column tag to a property of the Object in your list, using the 'row' variable name for the row-level variable
6. Set the 'name' attribute of the column tag to the name of the property in your row-level Object ( eg. 'id' for the column for 'row.id')

Example:

    <ice-cc:autoSortTable id="employees" bean="#{autoSortTableExampleBean.tableBean}" style="width:97%;" showDataPager="#{autoSortTableExampleBean.showDataPager}" showRowControls="#{autoSortTableExampleBean.showRowControls}" columnWidths="60px,100px,100px"> <ice-cc:column title="ID" value="#{row.id}" name="id" sortable="true"/> <ice-cc:column title="First Name" value="#{row.firstName}" name="firstName" sortable="true"/> <ice-cc:column title="Last Name" value="#{row.lastName}" name="lastName" sortable="true"/> </ice-cc:autoSortTable>

Tag Information
Tag Class | javax.faces.webapp.FacetTag
TagExtraInfo Class | None
Body Content | JSP
Display Name | Auto Sort Table Composite Component

Attributes
Name | Required | Request-time | Type | Description
id | true | false | `java.lang.String` | A unique id for the component.
bean | true | false | `com.icesoft.faces.facelets.component.table.autosort.AutoSortTableBean` | Must resolve to an instance of the AutorSortTableBean class
rendered | false | false | `java.lang.Boolean` | Flag indicating whether this component should be rendered (during Render Response Phase), or processed on any subsequent form submit (default true).
rows | false | false | `java.lang.Integer` | Passed through to the ice:dataTable
style | false | false | `java.lang.String` | CSS style(s) to be applied when this component is rendered
pagerStyle | false | false | `java.lang.String` | Inline CSS passed through to the paginator table element
showDataPager | false | false | `java.lang.Boolean` | Flag indicating whether or not the dataPaginator in the dataTable footer should be rendered (default true).
imageFirst | false | false | `java.lang.String` | Passed through to ice:dataPaginator
imageLast | false | false | `java.lang.String` | Passed through to ice:dataPaginator
imagePrevious | false | false | `java.lang.String` | Passed through to ice:dataPaginator
imageNext | false | false | `java.lang.String` | Passed through to ice:dataPaginator
imageFastNext | false | false | `java.lang.String` | Passed through to ice:dataPaginator
imageFastPrev | false | false | `java.lang.String` | Passed through to ice:dataPaginator
paginatorMaxPages | false | false | `java.lang.String` | Passed through to ice:dataPaginator
showRowControls | false | false | `java.lang.Boolean` | Flag indicating whether or not the row controls in the dataTable footer should be rendered (default true).
panelStyle | false | false | `java.lang.String` | Passed through to the style attribute on the footer ice:panelGroup containing the dataPaginator and row controls.
columnWidths | false | false | `java.lang.String` | A comma-delimited list of px-based widths for each column in the table

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.