org.alphadisplaytag.tags
Class AlphabeticTableTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.alphadisplaytag.tags.TemplateTag
              extended byorg.alphadisplaytag.tags.AlphabeticTableTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class AlphabeticTableTag
extends TemplateTag

The <nav:alphanavbar:*> tag creates an alphabetic navigation bar from a List of a string data.
A display tag library for slicing and dicing, a List object containing string data, into 37 alphabetical sublist.
Key Features
o List are broken up by the letter of the alphabet and place in a * map object keyed by the alphabetic letters to be navigated.
   For example to get the 'A' list use the A character as a key.
   36 sublist to capture the alphabet:[A][B] [C] ...... [X] [Y] [Z] [Full].
   There is the ability to revert to the [Full] list, instead of the broken list.
o The 37th sublist captures everything else and is keyd with ' ', like numbers, null and blanks.
   These are the beginning string that do not start with A-Z, such as number, null and blanks.
o There are CSS styled properties which are read first from the AlphaTableTag.properties file.
    If the properties are not found from this file, they are read from the define constants of the AlphaTableProperties.java file.
o The <nav:alphanavbar:*> works independant of the <display:*> tag.

The <nav:alphanavbar:*> attributes:
o name - The non-alphabetical list object, List, object is passed here. Required.
o keycolumn - The key column used to create and sort the alphabetical list.
   If this parameter is not defined the first string column found in the list is used based on Reflection's introspection.
o requestURI - For handling Struts and Tiles (whatEver.do) base URI.

Version:
$Revision: 1.0 $ ($Author: pchauvet $)
Author:
Philip Jahmani Chauvet
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
AlphabeticTableTag()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
          Clean up.
 int doStartTag()
           
 java.util.List getAlphabeticalsublist()
          Returns the current sublist containing a list with A, B , C.. or Z entries.
 java.util.List getFullList()
          Returns the full list
 java.lang.String getName()
          Returns the name.
 void release()
           
 void setKeycolumn(java.lang.String column)
          Set the key column
 void setName(java.lang.String value)
          Sets the name of the object to use for iteration.
 void setRequestURI(java.lang.String value)
          Setter for the "requestURI" attribute.
 
Methods inherited from class org.alphadisplaytag.tags.TemplateTag
evaluateExpression, write, write
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
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
getParent, setPageContext, setParent
 

Constructor Detail

AlphabeticTableTag

public AlphabeticTableTag()
Method Detail

setName

public void setName(java.lang.String value)
             throws java.lang.Exception
Sets the name of the object to use for iteration.

Parameters:
value - name of the object to use for iteration. Can contain expression
Throws:
java.lang.Exception

getName

public java.lang.String getName()
Returns the name.

Returns:
String

setKeycolumn

public void setKeycolumn(java.lang.String column)
Set the key column

Parameters:
column - The key column

setRequestURI

public void setRequestURI(java.lang.String value)
Setter for the "requestURI" attribute.

Parameters:
value - base URI for creating links

getFullList

public java.util.List getFullList()
Returns the full list

Returns:
String

getAlphabeticalsublist

public java.util.List getAlphabeticalsublist()
Returns the current sublist containing a list with A, B , C.. or Z entries.

Returns:
String

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Returns:
int
Throws:
javax.servlet.jsp.JspException - generic exception
See Also:
Tag.doStartTag()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Clean up.

Returns:
int
Throws:
javax.servlet.jsp.JspException - generic exception
See Also:
Tag.doEndTag()

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Returns:
int
Throws:
javax.servlet.jsp.JspException - generic exception
See Also:
IterationTag.doAfterBody()

release

public void release()
See Also:
Tag.release()


Alphabetical Navigation Bar Java Display Tag Home Page. 

My Home Page. Contact me at: chauvetp@hotmail.com.
I am alway looking for Java/J2EE work and would appreciate the business. Some of my design is inspired by the original display tag <display:*> code. Please go to http://displaytag.sourceforge.net/ for details on the <display:*> tag.

Copyright © 2004 Aiki Innovations Inc. Permission is granted to reuse and distribute for commercial or personal use if no extensive monetary gain is received. Java and the Java Standard Tag Library are programming languages owed by Sun Microsystems, Inc: http://java.sun.com/products/jsp/jstl/