|
CLRA 0.1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.jsp.tagext.TagSupport | +--com.clra.web.NameSelectorTag
Allows the user to choose a group of items, selected by the first letter of their name.
Selection is case-insensitive and limited to 8 predefined groups, like the buttons on a telephone:
Field Summary | |
protected static org.apache.struts.util.MessageResources |
messages
The message resources for this package |
protected String |
page
The context-relative URI |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
NameSelectorTag()
|
Method Summary | |
protected String |
createLink(int group,
javax.servlet.http.HttpServletRequest request)
Creates a link from the currentGroup request |
protected String |
createLink(int group,
String contextPath,
String page)
Create a link from the specified page |
protected String |
createQueryString(int group,
Hashtable queryParams)
Form a query string from current parameter and the specified group |
protected void |
doEndLink()
|
int |
doEndTag()
Render the end of the selector |
protected void |
doGroupLeadingSeparationText(int unused)
Writes the text that separates group links |
protected void |
doGroupLink(int group)
Write a group link |
protected void |
doGroupLinks()
Writes an alphabet's worth of group links |
protected void |
doGroupText(int group)
Writes a Integer-based group (2 - 9) as user-friendly text |
protected void |
doGroupTrailingSeparationText(int unused)
Writes the text that separates group links |
protected void |
doStartLink(int group)
|
int |
doStartTag()
Render the beginning of the selector |
Integer |
getCurrentGroup()
Return the currently selected group (2 - 9, or null) |
String |
getPage()
Return the context-relative URI |
static Integer |
groupFromContext(javax.servlet.jsp.PageContext context)
A utility which determines what group should be currently selected based on the page context. |
protected static Map |
groups()
The groups used by this selector |
void |
release()
Release any acquired resources. |
static void |
resetGroupInContexts(javax.servlet.jsp.PageContext context,
Integer group)
A utility which resets request and session attributes so that only the session attribute AN_GROUP holds the currently selected name. |
void |
setCurrentGroup(Integer currentGroup)
Set the currently selected group (2 - 9, or null) |
void |
setPage(String page)
Set the context-relative URI |
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 |
Field Detail |
protected static org.apache.struts.util.MessageResources messages
protected String page
Constructor Detail |
public NameSelectorTag()
Method Detail |
protected static Map groups()
public String getPage()
public void setPage(String page)
public Integer getCurrentGroup()
public void setCurrentGroup(Integer currentGroup) throws javax.servlet.jsp.JspException
public static Integer groupFromContext(javax.servlet.jsp.PageContext context)
public static void resetGroupInContexts(javax.servlet.jsp.PageContext context, Integer group)
protected String createQueryString(int group, Hashtable queryParams)
protected String createLink(int group, String contextPath, String page) throws javax.servlet.jsp.JspException
protected String createLink(int group, javax.servlet.http.HttpServletRequest request)
protected void doStartLink(int group) throws javax.servlet.jsp.JspException
protected void doEndLink() throws javax.servlet.jsp.JspException
protected void doGroupText(int group) throws javax.servlet.jsp.JspException
protected void doGroupLeadingSeparationText(int unused) throws javax.servlet.jsp.JspException
protected void doGroupTrailingSeparationText(int unused) throws javax.servlet.jsp.JspException
protected void doGroupLink(int group) throws javax.servlet.jsp.JspException
protected void doGroupLinks() throws javax.servlet.jsp.JspException
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
public void release()
release
in class javax.servlet.jsp.tagext.TagSupport
|
CLRA 0.1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |