org.apache.beehive.netui.tags.html
Class ErrorBaseTag

Object
  extended by SimpleTagSupport
      extended by AbstractSimpleTag
          extended by ErrorBaseTag
All Implemented Interfaces:
JspTag, SimpleTag, INetuiTag
Direct Known Subclasses:
Error, Errors

public abstract class ErrorBaseTag
extends AbstractSimpleTag


Field Summary
protected  String _bundle
          The message bundle where the error messages can be found.
protected  String _locale
          The session attribute key for the locale.
protected static Locale defaultLocale
          The default locale on our server.
 
Constructor Summary
ErrorBaseTag()
           
 
Method Summary
protected  String getErrorMessage(ActionError report, String bundle)
           
protected  String getQualifiedBundleName(String bundleName)
          Qualify the given bundle name with the current module path to return a full bundle name.
protected static boolean isMissingUserDefaultMessages(PageContext pageContext)
          Tell whether the current page flow has no default message bundle defined.
 void setBundle(String bundle)
          Set the name of the message bundle.
 void setLocale(String locale)
          Set the name of the locale attribute.
 
Methods inherited from class AbstractSimpleTag
addTagIdMapping, getBufferBody, getInlineError, getPageContext, getScriptReporter, getTagName, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class SimpleTagSupport
doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultLocale

protected static Locale defaultLocale
The default locale on our server.


_bundle

protected String _bundle
The message bundle where the error messages can be found. This defaults to org.apache.struts.action.Action.MESSAGES_KEY.


_locale

protected String _locale
The session attribute key for the locale. This defaults to org.apache.struts.action.Action.LOCALE_KEY.

Constructor Detail

ErrorBaseTag

public ErrorBaseTag()
Method Detail

setBundle

public final void setBundle(String bundle)
                     throws JspException
Set the name of the message bundle.

Parameters:
bundle - - the bundle name
Throws:
JspException

setLocale

public final void setLocale(String locale)
Set the name of the locale attribute.

Parameters:
locale - - the locale attribute name

getQualifiedBundleName

protected String getQualifiedBundleName(String bundleName)
Qualify the given bundle name with the current module path to return a full bundle name.

Returns:
the qualified Bundle name

getErrorMessage

protected String getErrorMessage(ActionError report,
                                 String bundle)
                          throws JspException
Parameters:
report -
bundle -
Returns:
message
Throws:
JspException

isMissingUserDefaultMessages

protected static boolean isMissingUserDefaultMessages(PageContext pageContext)
Tell whether the current page flow has no default message bundle defined.

Returns:
true if the current page flow (Struts module) has no user-specified default message bundle.