public class CoreColumn extends UIXColumn implements javax.faces.component.behavior.ClientBehaviorHolder
The immediate children of a Table component must all be
<tr:column>
components. Each visible Trinidad Column
component creates a separate column in the Table.
Use the "header" facet on a Column to create the column header. The following example creates a two-column table with the column headers - "Firstname" and "Lastname":
<tr:table> <tr:column> <f:facet name="header"> <tr:outputText value="Firstname"/> </f:facet> ... </tr:column> <tr:column> <f:facet name="header"> <tr:outputText value="Lastname"/> </f:facet> ... </tr:column> </tr:table>
The child components of each Column display the data for each row in that column. The Column does not create child components per row; instead, each child is repeatedly rendered (stamped) once per row. Because of this stamping behavior, only certain types of components are supported as children inside a Column. Supported components include all components with no behavior and most components that implement the EditableValueHolder or ActionSource interfaces.
As each row is stamped, the data for the current row ( see
getRowData()
on the Table)
is copied into an EL reachable property.
The name of this property is defined by the var
property on the Table. Once the Table has completed rendering, this
property is removed (or reverted back to its previous value). In
the following example, the data for each row is placed under the EL
property "row". Each Column displays the data for each row by getting
further properties from the "row" property:
<tr:table var="row" value="#{myBean.employees}"> <tr:column> <tr:outputText value="#{row.firstname}"/> </tr:column> <tr:column> tr:outputText value="#{row.lastname}"/> </tr:column> </tr:table>
The Column component supports the following attributes related to formatting:
In order to make this Column sortable, set the "sortable"
property to true and set "sortProperty" to the name of the
model that this column will sort. Sorting can be programatically
turned on with the setSortCritiera()
method on the\
table.
<tr:column>
tags can be nested to produce
groups of columns. The header of a column group spans across
all the columns it contains. The following example creates
a column group that has the header "Name" and contains
two sub columns with headers "First" and "Last":
<tr:table var="row" value="#{myBean.employees}"> <tr:column> <f:facet name="header"> <tr:outputText value="Name"/> </f:facet> <tr:column> <f:facet name="header"> <tr:outputText value="First"/> </f:facet> <tr:outputText value="#{row.firstname}"/> </tr:column> <tr:column> <f:facet name="header"> <tr:outputText value="Last"/> </f:facet> tr:outputText value="#{row.lastname}"/> </tr:column> </tr:column> </tr:table>
Type | Phases | Description |
---|---|---|
org.apache.myfaces.trinidad.event.AttributeChangeEvent |
Invoke Application Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing. |
UIXComponentBase.ComponentSystemEventListenerWrapper
FOOTER_FACET, HEADER_FACET, SORT_PROPERTY_KEY, SORT_STRENGTH_IDENTICAL, SORT_STRENGTH_KEY, SORT_STRENGTH_PRIMARY, SORT_STRENGTH_SECONDARY, SORT_STRENGTH_TERTIARY
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
Modifier | Constructor and Description |
---|---|
|
CoreColumn()
Construct an instance of the CoreColumn.
|
protected |
CoreColumn(String rendererType)
Construct an instance of the CoreColumn.
|
Modifier and Type | Method and Description |
---|---|
void |
addClientBehavior(String eventName,
javax.faces.component.behavior.ClientBehavior behavior)
Utility method to assist sub-classes in the implementation of the
ClientBehaviorHolder interface. |
String |
getAlign()
Gets The alignment for this column.
|
protected FacesBean.Type |
getBeanType() |
Map<String,List<javax.faces.component.behavior.ClientBehavior>> |
getClientBehaviors()
Utility method to assist sub-classes in the implementation of the
ClientBehaviorHolder interface. |
String |
getDefaultEventName()
Utility method to assist sub-classes in the implementation of the
ClientBehaviorHolder interface. |
String |
getDefaultSortOrder()
Gets The default sort order of the column.
|
Collection<String> |
getEventNames() |
String |
getFamily() |
String |
getHeaderText()
Gets text to display in the header of the column.
|
String |
getInlineStyle()
Gets the CSS styles to use for this component.
|
String |
getOnclick()
Gets an onclick Javascript handler.
|
String |
getOndblclick()
Gets an ondblclick Javascript handler.
|
String |
getOnkeydown()
Gets an onkeydown Javascript handler.
|
String |
getOnkeypress()
Gets an onkeypress Javascript handler.
|
String |
getOnkeyup()
Gets an onkeyup Javascript handler.
|
String |
getOnmousedown()
Gets an onmousedown Javascript handler.
|
String |
getOnmousemove()
Gets an onmousemove Javascript handler.
|
String |
getOnmouseout()
Gets an onmouseout Javascript handler.
|
String |
getOnmouseover()
Gets an onmouseover Javascript handler.
|
String |
getOnmouseup()
Gets an onmouseup Javascript handler.
|
String[] |
getPartialTriggers()
Gets the IDs of the components that should trigger a partial update.
|
String |
getShortDesc()
Gets The short description of the component.
|
String |
getStyleClass()
Gets a CSS style class to use for this component.
|
String |
getWidth()
Gets the preferred width of this column, e.g., "30%", "100px".
|
boolean |
isHeaderNoWrap()
Gets whether or not the column header
should be allowed to wrap
|
boolean |
isNoWrap()
Gets whether or not the column contents should be allowed to wrap
|
boolean |
isRowHeader()
Gets Whether or not this column is a row header column.
|
boolean |
isSeparateRows()
Gets whether or not the children of this column should be rendered on separate rows.
|
boolean |
isSortable()
Gets whether or not the column is sortable.
|
void |
setAlign(String align)
Sets The alignment for this column.
|
void |
setDefaultSortOrder(String defaultSortOrder)
Sets The default sort order of the column.
|
void |
setHeaderNoWrap(boolean headerNoWrap)
Sets whether or not the column header
should be allowed to wrap
|
void |
setHeaderText(String headerText)
Sets text to display in the header of the column.
|
void |
setInlineStyle(String inlineStyle)
Sets the CSS styles to use for this component.
|
void |
setNoWrap(boolean noWrap)
Sets whether or not the column contents should be allowed to wrap
|
void |
setOnclick(String onclick)
Sets an onclick Javascript handler.
|
void |
setOndblclick(String ondblclick)
Sets an ondblclick Javascript handler.
|
void |
setOnkeydown(String onkeydown)
Sets an onkeydown Javascript handler.
|
void |
setOnkeypress(String onkeypress)
Sets an onkeypress Javascript handler.
|
void |
setOnkeyup(String onkeyup)
Sets an onkeyup Javascript handler.
|
void |
setOnmousedown(String onmousedown)
Sets an onmousedown Javascript handler.
|
void |
setOnmousemove(String onmousemove)
Sets an onmousemove Javascript handler.
|
void |
setOnmouseout(String onmouseout)
Sets an onmouseout Javascript handler.
|
void |
setOnmouseover(String onmouseover)
Sets an onmouseover Javascript handler.
|
void |
setOnmouseup(String onmouseup)
Sets an onmouseup Javascript handler.
|
void |
setPartialTriggers(String[] partialTriggers)
Sets the IDs of the components that should trigger a partial update.
|
void |
setRowHeader(boolean rowHeader)
Sets Whether or not this column is a row header column.
|
void |
setSeparateRows(boolean separateRows)
Sets whether or not the children of this column should be rendered on separate rows.
|
void |
setShortDesc(String shortDesc)
Sets The short description of the component.
|
void |
setSortable(boolean sortable)
Sets whether or not the column is sortable.
|
void |
setStyleClass(String styleClass)
Sets a CSS style class to use for this component.
|
void |
setWidth(String width)
Sets the preferred width of this column, e.g., "30%", "100px".
|
getFooter, getHeader, getSortProperty, getSortStrength, processDecodes, processUpdates, processValidators, setFooter, setHeader, setPartialTarget, setSortProperty, setSortStrength
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcast, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getComponentChangeFilters, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getPassThroughAttributes, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl
addPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTree
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView
public static final String ALIGN_START
public static final String ALIGN_END
public static final String ALIGN_CENTER
public static final String ALIGN_LEFT
public static final String ALIGN_RIGHT
public static final String DEFAULT_SORT_ORDER_ASCENDING
public static final String DEFAULT_SORT_ORDER_DESCENDING
public static final FacesBean.Type TYPE
public static final PropertyKey INLINE_STYLE_KEY
public static final PropertyKey STYLE_CLASS_KEY
public static final PropertyKey SHORT_DESC_KEY
public static final PropertyKey PARTIAL_TRIGGERS_KEY
public static final PropertyKey ONCLICK_KEY
public static final PropertyKey ONDBLCLICK_KEY
public static final PropertyKey ONMOUSEDOWN_KEY
public static final PropertyKey ONMOUSEUP_KEY
public static final PropertyKey ONMOUSEOVER_KEY
public static final PropertyKey ONMOUSEMOVE_KEY
public static final PropertyKey ONMOUSEOUT_KEY
public static final PropertyKey ONKEYPRESS_KEY
public static final PropertyKey ONKEYDOWN_KEY
public static final PropertyKey ONKEYUP_KEY
public static final PropertyKey ALIGN_KEY
public static final PropertyKey DEFAULT_SORT_ORDER_KEY
public static final PropertyKey WIDTH_KEY
public static final PropertyKey HEADER_TEXT_KEY
public static final PropertyKey NO_WRAP_KEY
public static final PropertyKey HEADER_NO_WRAP_KEY
public static final PropertyKey SORTABLE_KEY
public static final PropertyKey SEPARATE_ROWS_KEY
public static final PropertyKey ROW_HEADER_KEY
public static final String COMPONENT_FAMILY
public static final String COMPONENT_TYPE
public CoreColumn()
protected CoreColumn(String rendererType)
public final String getInlineStyle()
public final void setInlineStyle(String inlineStyle)
inlineStyle
- the new inlineStyle valuepublic final String getStyleClass()
public final void setStyleClass(String styleClass)
styleClass
- the new styleClass valuepublic final String getShortDesc()
public final void setShortDesc(String shortDesc)
shortDesc
- the new shortDesc valuepublic final String[] getPartialTriggers()
This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too.
Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
Identifiers must account for NamingContainers. You can use a single colon to start the search from the root, or use multiple colons to move up through the NamingContainer. For example, "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), ":::" will pop out of two naming containers, etc. The search for the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the component with id = commandButton1 after popping out of two naming containers relative to this component. To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".
public final void setPartialTriggers(String[] partialTriggers)
This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too.
Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
Identifiers must account for NamingContainers. You can use a single colon to start the search from the root, or use multiple colons to move up through the NamingContainer. For example, "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), ":::" will pop out of two naming containers, etc. The search for the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the component with id = commandButton1 after popping out of two naming containers relative to this component. To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".
partialTriggers
- the new partialTriggers valuepublic final String getOnclick()
public final void setOnclick(String onclick)
onclick
- the new onclick valuepublic final String getOndblclick()
public final void setOndblclick(String ondblclick)
ondblclick
- the new ondblclick valuepublic final String getOnmousedown()
public final void setOnmousedown(String onmousedown)
onmousedown
- the new onmousedown valuepublic final String getOnmouseup()
public final void setOnmouseup(String onmouseup)
onmouseup
- the new onmouseup valuepublic final String getOnmouseover()
public final void setOnmouseover(String onmouseover)
onmouseover
- the new onmouseover valuepublic final String getOnmousemove()
public final void setOnmousemove(String onmousemove)
onmousemove
- the new onmousemove valuepublic final String getOnmouseout()
public final void setOnmouseout(String onmouseout)
onmouseout
- the new onmouseout valuepublic final String getOnkeypress()
public final void setOnkeypress(String onkeypress)
onkeypress
- the new onkeypress valuepublic final String getOnkeydown()
public final void setOnkeydown(String onkeydown)
onkeydown
- the new onkeydown valuepublic final String getOnkeyup()
public final void setOnkeyup(String onkeyup)
onkeyup
- the new onkeyup valuepublic final String getAlign()
public final void setAlign(String align)
align
- the new align valuepublic final String getDefaultSortOrder()
public final void setDefaultSortOrder(String defaultSortOrder)
defaultSortOrder
- the new defaultSortOrder valuepublic final String getWidth()
public final void setWidth(String width)
width
- the new width valuepublic final String getHeaderText()
public final void setHeaderText(String headerText)
headerText
- the new headerText valuepublic final boolean isNoWrap()
public final void setNoWrap(boolean noWrap)
noWrap
- the new noWrap valuepublic final boolean isHeaderNoWrap()
public final void setHeaderNoWrap(boolean headerNoWrap)
headerNoWrap
- the new headerNoWrap valuepublic final boolean isSortable()
This column's "sortProperty" attribute must be set if sorting is desired.
public final void setSortable(boolean sortable)
This column's "sortProperty" attribute must be set if sorting is desired.
sortable
- the new sortable valuepublic final boolean isSeparateRows()
public final void setSeparateRows(boolean separateRows)
separateRows
- the new separateRows valuepublic final boolean isRowHeader()
public final void setRowHeader(boolean rowHeader)
rowHeader
- the new rowHeader valuepublic String getDefaultEventName()
UIXComponentBase
ClientBehaviorHolder
interface.
This method must only be called by classes that implement the interface, doing otherwise will result in an exception.
getDefaultEventName
in interface javax.faces.component.behavior.ClientBehaviorHolder
getDefaultEventName
in class UIXComponentBase
ClientBehaviorHolder.getDefaultEventName()
public Collection<String> getEventNames()
getEventNames
in interface javax.faces.component.behavior.ClientBehaviorHolder
public Map<String,List<javax.faces.component.behavior.ClientBehavior>> getClientBehaviors()
UIXComponentBase
ClientBehaviorHolder
interface.
This method must only be called by classes that implement the interface, doing otherwise will result in an exception.
getClientBehaviors
in interface javax.faces.component.behavior.ClientBehaviorHolder
getClientBehaviors
in class UIXComponentBase
ClientBehaviorHolder.getClientBehaviors()
public void addClientBehavior(String eventName, javax.faces.component.behavior.ClientBehavior behavior)
UIXComponentBase
ClientBehaviorHolder
interface.
This method must only be called by classes that implement the interface, doing otherwise will result in an exception.
addClientBehavior
in interface javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior
in class UIXComponentBase
eventName
- The event namebehavior
- The behavior to addClientBehaviorHolder.addClientBehavior(String, ClientBehavior)
protected FacesBean.Type getBeanType()
getBeanType
in class UIXColumn
Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.