public class GroupErrorsRenderer extends Object implements Renderer
Constructor and Description |
---|
GroupErrorsRenderer() |
Modifier and Type | Method and Description |
---|---|
protected String |
buildKeyComment(String matchingKey,
String sectionGraphicAlt)
Builds an HTML comment, useful for debugging, which dumps out the message key being displayed
|
protected String |
buildSectionTitle(String titleConstant,
String sectionMarkGraphicName,
String sectionGraphicAlt)
Builds the HTML String for a section title
|
protected String |
buildTableRowAndCellClosing() |
protected String |
buildTableRowAndCellOpening() |
protected void |
cleanUpErrorTag()
Cleans up the ErrorTag
|
void |
clear()
Cleans up the errorPropertyList, the sectionTitle, the errorsRendered (so you'd better read that first),
and the ErrorTag used to display the errors
|
protected boolean |
foundKeyMatch(String key,
String keyToMatch)
Determines if the given error key matches the keyToMatch - either because the two keys are
equal, or if the keyToMatch is a wildcard key and would wildcard match the key
|
int |
getColSpan()
Gets the colSpan attribute.
|
String |
getErrorKeyMatch()
Gets the errorKeyMatch attribute.
|
List |
getErrorPropertyList(javax.servlet.jsp.PageContext pageContext)
Looks up the InfoPropertyList from the generating request
|
List<String> |
getErrorsRendered()
Gets the errorsRendered attribute.
|
protected List |
getInfoPropertyList(javax.servlet.jsp.PageContext pageContext)
Looks up the InfoPropertyList from the generating request
|
List<String> |
getInfoRendered()
Gets the infoRendered attribute.
|
protected String[] |
getKeysToMatch() |
protected List<String> |
getMatchingKeys(List messagePropertyList,
String[] keysToMatch)
Returns a list of all error keys that should be rendered
|
protected List |
getWarningPropertyList(javax.servlet.jsp.PageContext pageContext)
Looks up the InfoPropertyList from the generating request
|
List<String> |
getWarningsRendered()
Gets the warningsRendered attribute.
|
protected boolean |
matchesGroup(String key,
String[] keysToMatch)
Determines if the given key matches any error key associated with this group
|
void |
render(javax.servlet.jsp.PageContext pageContext,
javax.servlet.jsp.tagext.Tag parentTag)
Renders the errors, warnings, and messages for this page
|
protected void |
renderMessages(javax.servlet.jsp.PageContext pageContext,
javax.servlet.jsp.tagext.Tag parentTag,
String titleConstant,
List propertyList,
String sectionMarkGraphicName,
String sectionGraphicAlt,
List<String> keysRendered,
String requestScopeBeanNameContainingMessages)
Renders a group of messages
|
void |
setColSpan(int colSpan)
Sets the colSpan attribute value.
|
void |
setErrorKeyMatch(String errorKeyMatch)
Sets the errorKeyMatch attribute value.
|
public GroupErrorsRenderer()
public void clear()
clear
in interface Renderer
Renderer.clear()
protected void cleanUpErrorTag()
public void render(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag) throws javax.servlet.jsp.JspException
render
in interface Renderer
pageContext
- the JSP page context to render toparentTag
- the tag that is the "parent" of this renderingjavax.servlet.jsp.JspException
Renderer.render(javax.servlet.jsp.PageContext, javax.servlet.jsp.tagext.Tag)
protected void renderMessages(javax.servlet.jsp.PageContext pageContext, javax.servlet.jsp.tagext.Tag parentTag, String titleConstant, List propertyList, String sectionMarkGraphicName, String sectionGraphicAlt, List<String> keysRendered, String requestScopeBeanNameContainingMessages) throws javax.servlet.jsp.JspException
pageContext
- the page context to render toparentTag
- the name of the parent tag requesting this renderingtitleConstant
- the Key Constant to text for the titlepropertyList
- the list of properties to displaysectionMarkGraphicName
- the file name of the mark graphic to displaysectionGraphicAlt
- the wording to be used in the "alt" section of the mark graphicjavax.servlet.jsp.JspException
- thrown if rendering cannot be successfully completedprotected String buildSectionTitle(String titleConstant, String sectionMarkGraphicName, String sectionGraphicAlt)
titleConstant
- the Key Constant to find the text for the titlesectionMarkGraphicName
- the name of the graphic file to usesectionGraphicAlt
- the alt for the graphicprotected String buildKeyComment(String matchingKey, String sectionGraphicAlt)
matchingKey
- the key to displaysectionGraphicAlt
- the alt for this section, we'll reuse it for the commentsprotected String buildTableRowAndCellOpening()
protected String buildTableRowAndCellClosing()
protected List<String> getMatchingKeys(List messagePropertyList, String[] keysToMatch)
keysToMatch
- the keys that this group will matchprotected String[] getKeysToMatch()
protected boolean foundKeyMatch(String key, String keyToMatch)
key
- the error key to matchkeyToMatch
- one of the error keys this group will displayprotected boolean matchesGroup(String key, String[] keysToMatch)
key
- the error key that may or may not be displayed herekeysToMatch
- the keys that this group will match againstpublic List getErrorPropertyList(javax.servlet.jsp.PageContext pageContext)
pageContext
- the pageContext which this tag is rendering toprotected List getWarningPropertyList(javax.servlet.jsp.PageContext pageContext)
pageContext
- the pageContext which this tag is rendering toprotected List getInfoPropertyList(javax.servlet.jsp.PageContext pageContext)
pageContext
- the pageContext which this tag is rendering topublic List<String> getErrorsRendered()
public List<String> getWarningsRendered()
public List<String> getInfoRendered()
public String getErrorKeyMatch()
public void setErrorKeyMatch(String errorKeyMatch)
errorKeyMatch
- The errorKeyMatch to set.public int getColSpan()
public void setColSpan(int colSpan)
colSpan
- The colSpan to set.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.