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 _bundleName
          The name of the message bundle, as defined in the page flow's Jpf.MessageBundle annotation, 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(ActionMessage report, String bundleName)
           
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(ModuleConfig mc)
          Tell whether the given Struts module has no default message bundle defined.
protected static boolean isMissingUserDefaultMessages(PageContext pageContext)
          Tell whether the given Struts module has no default message bundle defined.
 void setBundle(String bundle)
          Deprecated. Use setBundleName(java.lang.String) instead.
 void setBundleName(String bundleName)
          Set the name of the message bundle, as defined in the page flow's Jpf.MessageBundle annotation, where the error messages can be found.
 void setLocale(String locale)
          Set the name of the locale attribute.
 
Methods inherited from class AbstractSimpleTag
getBufferBody, getHtmlTag, getIdForTagId, 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.


_bundleName

protected String _bundleName
The name of the message bundle, as defined in the page flow's Jpf.MessageBundle annotation, 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
Deprecated. Use setBundleName(java.lang.String) instead.

Set the name of the message bundle, as defined in the page flow's Jpf.MessageBundle annotation, where the error messages can be found. If this attribute is not set, the page flow's default message bundle is used.

Parameters:
bundle - - the bundle name
Throws:
JspException

setBundleName

public final void setBundleName(String bundleName)
                         throws JspException
Set the name of the message bundle, as defined in the page flow's Jpf.MessageBundle annotation, where the error messages can be found. If this attribute is not set, the page flow's default message bundle is used.

Parameters:
bundleName - - 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(ActionMessage report,
                                 String bundleName)
                          throws JspException
Parameters:
report -
bundleName -
Returns:
message
Throws:
JspException

isMissingUserDefaultMessages

protected static boolean isMissingUserDefaultMessages(PageContext pageContext)
Tell whether the given Struts module has no default message bundle defined.

Returns:
true if the given Struts module has no user-specified default message bundle.

isMissingUserDefaultMessages

protected static boolean isMissingUserDefaultMessages(ModuleConfig mc)
Tell whether the given Struts module has no default message bundle defined.

Returns:
true if the given Struts module has no user-specified default message bundle.