ICEfaces EE Composite Components
Tag editableTable


The Editable Data Table Composite Component

Features

How To Use

  1. Add the <ice-cc:editableTable/> tag to your page. Nest <ice-cc:css/> in your page <head> tag.
  2. Bind the 'bean' attribute to an instance of EditableTableBean
  3. If you would like to use the listener interface, create a class that implements the IEditableTableEventListener, and use the EditableTableBean(List,IEditableTableEventListener) overloaded constructor
  4. Set the 'idProperty' attribute on the tag. This should correspond to the property on the row-level bean that is used to identify the row
  5. For each column that you wish to be editable, choose the <ice-cc:textColumn/>, <ice-cc:selectOneMenuColumn/>, <ice-cc:selectBooleanColumn/>, or <ice-cc:selectInputDateColumn/> tags
  6. Specify the 'title' attribute for each editable column tag
  7. Specify the 'property' attribute for each editable column tag
  8. Specify the 'width' attribute for each editable column tag
  9. For <ice-cc:selectOneMenuColumn/>s, bind the 'selectItems' attribute to a list of SelectItems to be used in the associated drop down list
  10. Nest converters and/or validators inside <ui:define name="converter"> and/or <ui:define name="validator"> tags:
     <ice-cc:selectInputDateColumn title="Birth Date"
    property="birthDate" width="150px"
    required="true">
    <ui:define name="converter">
    <f:convertDateTime dateStyle="short"/>
    </ui:define>
    </ice-cc:selectInputDateColumn>
  11. For any columns that you do not wish to be made editable, use the <ice-cc:column/> tag in the following manner <ice-cc:column title="ID" value="#{row.id}" name="id"/> where 'row' is always the 'var' name used to access the property in the source dataTable.
  12. Optionally specify whether the 1st ID column show be shown with the 'renderIdCol' attribute.

Example:
<ice-cc:editableTable bean="#{editableTableExampleBean.editableTableBean}" id="editableTable" idProperty="id" renderIdCol="false"> <ice-cc:textColumn title="First Name" property="firstName" width="100px"/> <ice-cc:textColumn title="Last Name" property="lastName" width="100px"/> <ice-cc:selectOneMenuColumn title="Department" property="departmentName" selectItems="#{editableTableExampleBean.departments}" width="80px"/> <ice-cc:selectInputDateColumn title="Birth Date" property="birthDate" width="150px"> <f:convertDateTime dateStyle="default"/> </ice-cc:selectInputDateColumn> </ice-cc:editableTable>


Tag Information
Tag Classjavax.faces.webapp.FacetTag
TagExtraInfo ClassNone
Body Contenttagdependent
Display NameEditable Table

Attributes
NameRequiredRequest-timeTypeDescription
idtruefalsejava.lang.StringA unique id for the component.
beantruefalsecom.icesoft.faces.facelets.component.table.editable.EditableTableBeanMust resolve to an instance of the EditableTableBean class
idPropertytruefalsejava.lang.StringThe name of the id property in your bean
renderIdColfalsefalsejava.lang.BooleanFlag indicating whether the id property's column will be rendered (default true).
renderedfalsefalsejava.lang.BooleanFlag indicating whether this component should be rendered (during Render Response Phase), or processed on any subsequent form submit (default true).
deleteRowsfalsefalsejava.lang.BooleanComponent level ability to delete table rows. Defaults to true.
addRowsfalsefalsejava.lang.BooleanComponent level ability to add table rows. Defaults to true.
renderIdColfalsefalsejava.lang.BooleanSpecify whether the ID column should be shown. Defaults to false.
rowsfalsefalsejava.lang.IntegerPassed through to the ice:dataTable
showDataPagerInfofalsefalsejava.lang.BooleanFlag indicating whether or not the info dataPaginator in the header above the dataTable should be rendered (default true).
showDataPagerfalsefalsejava.lang.BooleanFlag indicating whether or not the dataPaginator in the dataTable footer should be rendered (default true).
showRowControlsfalsefalsejava.lang.BooleanFlag indicating whether or not the row controls in the dataTable footer should be rendered (default true).
panelStylefalsefalsejava.lang.StringPassed through to the style attribute on the footer ice:panelGroup containing the dataPaginator and row controls.
multiplefalsefalsejava.lang.BooleanPass through attribute to ice:rowSelector component
preStyleOnSelectionfalsefalsejava.lang.BooleanPass through attribute to ice:rowSelector component
toggleOnInputfalsefalsejava.lang.BooleanPass through attribute to ice:rowSelector component
stylefalsefalsejava.lang.StringCSS style(s) to be applied when this component is rendered
styleClassfalsefalsejava.lang.StringSpace-separated list of CSS style class(es) to be applied when this element is rendered.
readOnlyfalsefalsejava.lang.BooleanIf set to true (default false) will not allow row editing, creation, or deletion
showMessagesInCompfalsefalsejava.lang.BooleanIf set to false (default true) will not display JSF messages inside the editable table. Messages will still be displayed in other ice:messages, or h:messages components on the page
disableMenusfalsefalsejava.lang.BooleanIf set to true (default false) will not display richt click popup menus for adding a new row
titlePropertyfalsefalsejava.lang.StringThe property of the row item to be rendered as the row-level column ouput title
fastStepfalsefalsejava.lang.IntegerPassed through to ice:dataPaginator
paginatorMaxPagesfalsefalsejava.lang.IntegerPassed through to ice:dataPaginator

Variables
No Variables Defined.


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.