org.apache.myfaces.custom.sortheader
Class AbstractHtmlCommandSortHeader

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by javax.faces.component.html.HtmlCommandLink
                  extended by org.apache.myfaces.component.html.ext.AbstractHtmlCommandLink
                      extended by org.apache.myfaces.component.html.ext.HtmlCommandLink
                          extended by org.apache.myfaces.custom.sortheader.AbstractHtmlCommandSortHeader
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder, ForceIdAware, UserRoleAware

public abstract class AbstractHtmlCommandSortHeader
extends org.apache.myfaces.component.html.ext.HtmlCommandLink

Clickable sort column header. Must be nested inside an extended data_table tag. This tag is derived from the standard command_link tag and has the additional attributes columnName and arrow. Note: In contrast to normal command links, the default for the "immediate" attribute is "true". This is desirable as it avoids validating all input fields in the enclosing form when the column sort order changes. HOWEVER when the table contains input components "immediate" must be set to false; otherwise input fields will render blank after a sort, or will show their old values (ie will not appear to sort though output fields in the table will sort) when sort ordering is changed. Unless otherwise specified, all attributes accept static values or EL expressions.

Since:
1.1.7
Version:
$Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (Wed, 03 Sep 2008) $
Author:
Manfred Geiler (latest modification by $Author: lu4242 $)

Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
static String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from interface org.apache.myfaces.component.UserRoleAware
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR
 
Constructor Summary
AbstractHtmlCommandSortHeader()
           
 
Method Summary
 void broadcast(javax.faces.event.FacesEvent event)
           
 org.apache.myfaces.component.html.ext.HtmlDataTable findParentDataTable()
           
abstract  String getColumnName()
          The name of this column.
abstract  String getPropertyName()
          The property name associated with this column.
abstract  boolean isArrow()
          Indicates whether an arrow, that shows the sort direction should be rendered.
 
Methods inherited from class org.apache.myfaces.component.html.ext.HtmlCommandLink
getActionFor, getDisabledStyle, getDisabledStyleClass, getEnabledOnUserRole, getFamily, getVisibleOnUserRole, isDisabled, isForceId, isForceIdIndex, restoreState, saveState, setActionFor, setDisabled, setDisabledStyle, setDisabledStyleClass, setEnabledOnUserRole, setForceId, setForceIdIndex, setVisibleOnUserRole
 
Methods inherited from class org.apache.myfaces.component.html.ext.AbstractHtmlCommandLink
getClientId, isRendered
 
Methods inherited from class javax.faces.component.html.HtmlCommandLink
getAccesskey, getCharset, getCoords, getDir, getHreflang, getLang, getOnblur, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRel, getRev, getShape, getStyle, getStyleClass, getTabindex, getTarget, getTitle, getType, setAccesskey, setCharset, setCoords, setDir, setHreflang, setLang, setOnblur, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRel, setRev, setShape, setStyle, setStyleClass, setTabindex, setTarget, setTitle, setType
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, getAction, getActionListener, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

public static final String DEFAULT_RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

AbstractHtmlCommandSortHeader

public AbstractHtmlCommandSortHeader()
Method Detail

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class javax.faces.component.UICommand
Throws:
javax.faces.event.AbortProcessingException

findParentDataTable

public org.apache.myfaces.component.html.ext.HtmlDataTable findParentDataTable()

getColumnName

public abstract String getColumnName()
The name of this column. This name must uniquely identify this column among all other (sortable) columns in the same data_table. The sortColumn attribute of the embedding data_table reflects the current sort column (see extended data_table).


getPropertyName

public abstract String getPropertyName()
The property name associated with this column. This name must be one of the properties of the row object by which the sorting should be performed. The sortProperty attribute of the embedding data_table reflects the current sort property (see extended data_table).


isArrow

public abstract boolean isArrow()
Indicates whether an arrow, that shows the sort direction should be rendered. Default: false



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.