org.hdpagination.web.jsf.component
Class SortByOption

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.hdpagination.web.jsf.component.SortByOption
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder

public class SortByOption
extends javax.faces.component.UIComponentBase

SortByOption is a component that must be nested inside the 'selectSort' tag. It is rendered as a selection item for the dropdown rendered by the 'selectSort' tag.

Since:
1.2
Author:
Liangfeng Ren

Field Summary
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Constructor Summary
SortByOption()
           
 
Method Summary
 java.lang.String getAscending()
          This property is used to indicate whether the search result should be sorted in ascending or descending order.
 java.lang.String getFamily()
           
 java.lang.String getLabel()
          Return the label for this selection item
 java.lang.String getSortedColumn()
          Return the property of sortedColumn.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAscending(java.lang.String ascending)
          This property is used to indicate weather the search result should be sorted in ascending or descending order.
 void setLabel(java.lang.String label)
          Set the label for this selection item
 void setSortedColumn(java.lang.String sortedColumn)
          Set property of sortedColumn.
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortByOption

public SortByOption()
Method Detail

getSortedColumn

public java.lang.String getSortedColumn()
Return the property of sortedColumn. It will be appended to "order by" clause of SQL or ORM statement. It's tag user's responsibility to make sure the value of this property is mapped to table column or Bean property correctly and satisfy the related Database SQL or ORM Query syntax

Returns:

setSortedColumn

public void setSortedColumn(java.lang.String sortedColumn)
Set property of sortedColumn. It will be appended to "order by" clause of SQL or ORM statement. It's tag user's responsibility to make sure the value of this property is mapped to table column or Bean property correctly and satisfy the related Database SQL or ORM Query syntax

Parameters:
sortedColumn -

getLabel

public java.lang.String getLabel()
Return the label for this selection item

Returns:

setLabel

public void setLabel(java.lang.String label)
Set the label for this selection item

Parameters:
label -

getAscending

public java.lang.String getAscending()
This property is used to indicate whether the search result should be sorted in ascending or descending order. Its valid values are "true", "false", "yes" and "no" (case insensitive). Value of "true" or "yes" means ascending oder; "false" or "no" means descending order.

Returns:

setAscending

public void setAscending(java.lang.String ascending)
This property is used to indicate weather the search result should be sorted in ascending or descending order. Its valid values are "true", "false", "yes" and "no" (case insensitive). Value of "true" or "yes" means ascending oder; "false" or "no" means descending order.

Parameters:
ascending -

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase


Copyright © 2008 HDPagination All Rights Reserved.