org.hdpagination.web.taglib
Class SortByOptionTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.hdpagination.web.taglib.SortByOptionTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class SortByOptionTag
extends javax.servlet.jsp.tagext.TagSupport

This tag ('sortByOption') is a selection item (<option>) and must be nested inside the 'selectSortBy' Tag. It renders this selection item (<option>) for the dropdown (<select>).

Since:
1.2
Author:
Liangfeng Ren
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
SortByOptionTag()
           
 
Method Summary
 int doEndTag()
           
 void setAscending(java.lang.String ascending)
          This property is used to indicate whether 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)
          The value of this property will be appended to "order by" clause of SQL or ORM statement.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortByOptionTag

public SortByOptionTag()
Method Detail

setSortedColumn

public void setSortedColumn(java.lang.String sortedColumn)
The value of this property 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 -

setLabel

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

Parameters:
label -

setAscending

public void setAscending(java.lang.String ascending)
This property is used to indicate whether the search result should be sorted in ascending or descending order. Valid value for the setting is "true", "false", "yes" and "no" (case insensitive). Value of "true" or "yes" means ascending order; "false" or "no" means descending order.

Parameters:
ascending -

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException


Copyright © 2008 HDPagination All Rights Reserved.