|
|||||||||
| Home >> All >> com >> clra >> [ web overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.clra.web
Class MemberNameFormatSelectorTag

java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.clra.web.MemberNameFormatSelectorTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class MemberNameFormatSelectorTag
- extends javax.servlet.jsp.tagext.TagSupport
Allows the user to specify whether names should be formated according to MemberNameFormat.FIRSTLAST or MemberNameFormat.LASTFIRST.
- Version:
- $Revision: 1.3 $ $Date: 2003/02/26 03:38:46 $
| Field Summary | |
private static java.util.Map |
_groups
The cached value of the groups used by this selector |
private static java.lang.String |
base
|
private java.lang.Integer |
currentGroup
The currently selected group (2 - 9) |
protected static org.apache.struts.util.MessageResources |
messages
The message resources for this package |
protected java.lang.String |
page
The context-relative URI |
private static org.apache.log4j.Category |
theLog
|
| 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 | |
MemberNameFormatSelectorTag()
|
|
| Method Summary | |
protected java.lang.String |
createLink(int group,
javax.servlet.http.HttpServletRequest request)
Creates a link from the currentGroup request |
protected java.lang.String |
createLink(int group,
java.lang.String contextPath,
java.lang.String page)
Create a link from the specified page |
protected java.lang.String |
createQueryString(int group,
java.util.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 |
java.lang.Integer |
getCurrentGroup()
Return the currently selected group (2 - 9, or null) |
java.lang.String |
getPage()
Return the context-relative URI |
static java.lang.Integer |
groupFromContext(javax.servlet.jsp.PageContext context)
A utility which determines what group should be currently selected based on the page context. |
protected static java.util.Map |
groups()
The groups used by this selector |
void |
release()
Release any acquired resources. |
static void |
resetGroupInContexts(javax.servlet.jsp.PageContext context,
java.lang.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(java.lang.Integer currentGroup)
Set the currently selected group (2 - 9, or null) |
void |
setPage(java.lang.String page)
Set the context-relative URI |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, 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 |
base
private static final java.lang.String base
theLog
private static final org.apache.log4j.Category theLog
messages
protected static org.apache.struts.util.MessageResources messages
- The message resources for this package
_groups
private static java.util.Map _groups
- The cached value of the groups used by this selector
page
protected java.lang.String page
- The context-relative URI
currentGroup
private java.lang.Integer currentGroup
- The currently selected group (2 - 9)
| Constructor Detail |
MemberNameFormatSelectorTag
public MemberNameFormatSelectorTag()
| Method Detail |
groups
protected static java.util.Map groups()
- The groups used by this selector
getPage
public java.lang.String getPage()
- Return the context-relative URI
setPage
public void setPage(java.lang.String page)
- Set the context-relative URI
getCurrentGroup
public java.lang.Integer getCurrentGroup()
- Return the currently selected group (2 - 9, or null)
setCurrentGroup
public void setCurrentGroup(java.lang.Integer currentGroup) throws javax.servlet.jsp.JspException
- Set the currently selected group (2 - 9, or null)
groupFromContext
public static java.lang.Integer groupFromContext(javax.servlet.jsp.PageContext context)
- A utility which determines what group should be currently selected
based on the page context. The algorithm is:
- Check for a request parameter named INameList.AN_GROUP. If found, and it is a valid Integer in the range 2 - 9, use it.
- Check for a request attribute named INameList.AN_GROUP. If found, and it is valid, use it.
- Check for a session attribute named INameList.AN_GROUP. If found, and it is valid, use it.
- If a valid group hasn't been determined yet, return the index of the first group, ABC (index 2).
resetGroupInContexts
public static void resetGroupInContexts(javax.servlet.jsp.PageContext context, java.lang.Integer group)
- A utility which resets request and session attributes so that only
the session attribute AN_GROUP holds the currently selected name.
The algorithm is:
- Check for a request attribute named INameList.AN_GROUP. If found, remove it.
- Check for a session attribute named INameList.AN_GROUP. If found, reset to the specified value; otherwise create and set it.
createQueryString
protected java.lang.String createQueryString(int group, java.util.Hashtable queryParams)
- Form a query string from current parameter and the specified group
createLink
protected java.lang.String createLink(int group, java.lang.String contextPath, java.lang.String page) throws javax.servlet.jsp.JspException
- Create a link from the specified page
createLink
protected java.lang.String createLink(int group, javax.servlet.http.HttpServletRequest request)
- Creates a link from the currentGroup request
doStartLink
protected void doStartLink(int group)
throws javax.servlet.jsp.JspException
doEndLink
protected void doEndLink()
throws javax.servlet.jsp.JspException
doGroupText
protected void doGroupText(int group)
throws javax.servlet.jsp.JspException
- Writes a Integer-based group (2 - 9) as user-friendly text
doGroupLeadingSeparationText
protected void doGroupLeadingSeparationText(int unused)
throws javax.servlet.jsp.JspException
- Writes the text that separates group links
doGroupTrailingSeparationText
protected void doGroupTrailingSeparationText(int unused)
throws javax.servlet.jsp.JspException
- Writes the text that separates group links
doGroupLink
protected void doGroupLink(int group)
throws javax.servlet.jsp.JspException
- Write a group link
doGroupLinks
protected void doGroupLinks()
throws javax.servlet.jsp.JspException
- Writes an alphabet's worth of group links
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Render the beginning of the selector
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Render the end of the selector
release
public void release()
- Release any acquired resources.
|
|||||||||
| Home >> All >> com >> clra >> [ web overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC