org.hdpagination.web.jsf.tag
Class SortLinkTag

java.lang.Object
  extended by javax.faces.webapp.UIComponentTagBase
      extended by javax.faces.webapp.UIComponentClassicTagBase
          extended by javax.faces.webapp.UIComponentTag
              extended by org.hdpagination.web.jsf.tag.AbstractBaseTag
                  extended by org.hdpagination.web.jsf.tag.SortLinkTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspIdConsumer, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class SortLinkTag
extends AbstractBaseTag

This JSF Tag is used to render the column header with hyperlink (<a>) in a search results table. This allows the user to sort the search results by this column. By default, when the column header is clicked and the current search result is not sorted by that column, then the result will be displayed in ascending order. The search results will be toggled between ascending and descending order every time the column header is clicked.

Since:
1.1
Author:
Liangfeng Ren

Field Summary
 
Fields inherited from class javax.faces.webapp.UIComponentClassicTagBase
bodyContent, pageContext, UNIQUE_ID_PREFIX
 
Fields inherited from class javax.faces.webapp.UIComponentTagBase
log
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Constructor Summary
SortLinkTag()
           
 
Method Summary
 java.lang.String getComponentType()
           
 java.lang.String getRendererType()
           
 void setProperties(javax.faces.component.UIComponent component)
           
 void setSortedColumn(java.lang.String sortedColumn)
          Set property of sortedColumn.
 void setValue(java.lang.String value)
          Set the column header(or title).
 
Methods inherited from class org.hdpagination.web.jsf.tag.AbstractBaseTag
setAccesskey, setPagiDefinitionId, setStyle, setStyleClass, setTabindex, setTitle
 
Methods inherited from class javax.faces.webapp.UIComponentTag
createComponent, getParentUIComponentTag, hasBinding, isSuppressed, isValueReference, release, setBinding, setRendered
 
Methods inherited from class javax.faces.webapp.UIComponentClassicTagBase
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doAfterBody, doEndTag, doInitBody, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriter
 
Methods inherited from class javax.faces.webapp.UIComponentTagBase
getELContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, setPageContext, setParent
 

Constructor Detail

SortLinkTag

public SortLinkTag()
Method Detail

getRendererType

public java.lang.String getRendererType()
Specified by:
getRendererType in class javax.faces.webapp.UIComponentTagBase

getComponentType

public java.lang.String getComponentType()
Specified by:
getComponentType in class javax.faces.webapp.UIComponentTagBase

setValue

public void setValue(java.lang.String value)
Set the column header(or title).

Parameters:
value -

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 -

setProperties

public void setProperties(javax.faces.component.UIComponent component)
Overrides:
setProperties in class AbstractBaseTag


Copyright © 2008 HDPagination All Rights Reserved.