org.mmbase.bridge.jsp.taglib
Class LocaleTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended byorg.mmbase.bridge.jsp.taglib.CloudReferrerTag
                  extended byorg.mmbase.bridge.jsp.taglib.LocaleTag
All Implemented Interfaces:
BodyTag, IterationTag, Serializable, Tag
Direct Known Subclasses:
ContentTag

public class LocaleTag
extends CloudReferrerTag

Provides Locale (language, country) information to its body.

Version:
$Id: LocaleTag.java,v 1.27 2006/07/08 14:38:18 michiel Exp $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  Cloud cloud
           
static String KEY
           
protected  Locale locale
           
protected  Locale prevLocale
           
static int SCOPE
           
static String TZ_KEY
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
LocaleTag()
           
 
Method Summary
protected  void determineFromCloudProvider()
           
protected  void determineLocale()
           
protected  void determineLocaleFromAttributes()
           
 int doAfterBody()
           
 int doEndTag()
           
 int doStartTag()
           
 Locale getLocale()
          Child tags can call this function to obtain the Locale they must use.
 void release()
          Release all allocated resources.
 void setCountry(String c)
           
 void setJspvar(String j)
           
 void setLanguage(String lang)
           
 void setTimezone(String t)
           
 void setVariant(String v)
           
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
fillStandardParameters, findCloudProvider, findCloudProvider, getCloudContext, getCloudVar, getNode, getNodeOrNull, setCloud
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
findLoopOrQuery, findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getDefaultLocale, getEscapedValue, getId, getObject, getObjectConditional, getPageContext, getPageContextTag, getReferid, getString, getTaglibVersion, getTimeZone, getWriterValue, haveBody, setContext, setEscape, setId, setListdelimiter, setPageContext, setReferid, setVartype, setWrite, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

KEY

public static final String KEY
See Also:
Constant Field Values

TZ_KEY

public static final String TZ_KEY
See Also:
Constant Field Values

SCOPE

public static final int SCOPE
See Also:
Constant Field Values

locale

protected Locale locale

prevLocale

protected Locale prevLocale

cloud

protected Cloud cloud
Constructor Detail

LocaleTag

public LocaleTag()
Method Detail

setLanguage

public void setLanguage(String lang)
                 throws JspTagException
Throws:
JspTagException

setCountry

public void setCountry(String c)
                throws JspTagException
Throws:
JspTagException

setVariant

public void setVariant(String v)
                throws JspTagException
Throws:
JspTagException

setTimezone

public void setTimezone(String t)
                 throws JspTagException
Throws:
JspTagException
Since:
MMBase-1.8.1

getLocale

public Locale getLocale()
Child tags can call this function to obtain the Locale they must use.

Overrides:
getLocale in class CloudReferrerTag

setJspvar

public void setJspvar(String j)
Overrides:
setJspvar in class ContextReferrerTag

doStartTag

public int doStartTag()
               throws JspTagException
Throws:
JspTagException

determineLocale

protected void determineLocale()
                        throws JspTagException
Throws:
JspTagException

determineFromCloudProvider

protected void determineFromCloudProvider()
                                   throws JspTagException
Throws:
JspTagException

determineLocaleFromAttributes

protected void determineLocaleFromAttributes()
                                      throws JspTagException
Throws:
JspTagException

doAfterBody

public int doAfterBody()
                throws JspTagException
Throws:
JspTagException

doEndTag

public int doEndTag()
             throws JspTagException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
JspTagException

release

public void release()
Description copied from class: ContextReferrerTag
Release all allocated resources.

Specified by:
release in interface Tag
Overrides:
release in class ContextReferrerTag


MMBase build 1.8.1.20060716