org.mmbase.bridge.jsp.taglib
Class FormatterTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended by org.mmbase.bridge.jsp.taglib.CloudReferrerTag
                  extended by org.mmbase.bridge.jsp.taglib.FormatterTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally, ParamHandler

public class FormatterTag
extends CloudReferrerTag
implements ParamHandler

The formatter can reformat its body. It usually uses XSL for this.

Since:
MMBase-1.6
Version:
$Id: FormatterTag.java 35335 2009-05-21 08:14:41Z michiel $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  List<Entry<String,Object>> extraParameters
           
protected  Attribute format
           
protected  Attribute namespaceAware
           
protected  Attribute options
           
(package private)  Properties props
           
protected  Attribute referids
           
protected  int timerHandle
          A handle necessary when using the Timer Tag;
protected  Attribute wants
           
protected  Attribute xslt
           
protected  Source xsltSource
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
cloudId
 
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 org.mmbase.bridge.jsp.taglib.ParamHandler
KEY, SCOPE
 
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
FormatterTag()
           
 
Method Summary
 void addParameter(String key, Object value)
           
 int doAfterBody()
           
 int doEndTag()
           
 void doFinally()
           
 int doStartTag()
           
protected  int getFormat()
           
 Generator getGenerator()
          Subtags can write themselves as XML to the DOM document of this tag.
protected  int getWants()
           
 boolean setCloud(Cloud c)
          return false if the cloud was set already (nothing happened);
 void setFormat(String f)
          Predefined formattings.
 void setNamespaceaware(String n)
           
 void setOptions(String o)
          The 'options' attribute can be used to provide option to the transformation to be done
 void setOutputProperties(Properties properties)
           
 void setPageContext(PageContext pageContext)
           
 void setReferids(String r)
           
 void setWants(String w)
           
 void setXslt(String x)
          You can give the path the the XSLT-file by this attribute.
 void setXsltSource(Source xs)
          The Xslt tag will call this, to inform this tag about the XSLT which must be done.
 boolean wantXML()
          Subtags need to know how they must communicate there content to this tag.
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
fillStandardParameters, findCloudProvider, findCloudProvider, getCloudContext, getCloudVar, getLocale, getNode, getNodeOrNull, setCloud
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
appendMoreParameters, doCatch, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setListdelimiter, setPageContextOnly, 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

xslt

protected Attribute xslt

format

protected Attribute format

options

protected Attribute options

wants

protected Attribute wants

namespaceAware

protected Attribute namespaceAware

referids

protected Attribute referids

extraParameters

protected List<Entry<String,Object>> extraParameters

xsltSource

protected Source xsltSource

props

Properties props

timerHandle

protected int timerHandle
A handle necessary when using the Timer Tag;

Constructor Detail

FormatterTag

public FormatterTag()
Method Detail

setXslt

public void setXslt(String x)
             throws JspTagException
You can give the path the the XSLT-file by this attribute.

Throws:
JspTagException

setFormat

public void setFormat(String f)
               throws JspTagException
Predefined formattings.

Throws:
JspTagException

getFormat

protected int getFormat()
                 throws JspTagException
Throws:
JspTagException

setOptions

public void setOptions(String o)
                throws JspTagException
The 'options' attribute can be used to provide option to the transformation to be done

Throws:
JspTagException

setWants

public void setWants(String w)
              throws JspTagException
Throws:
JspTagException

getWants

protected int getWants()
                throws JspTagException
Throws:
JspTagException

setNamespaceaware

public void setNamespaceaware(String n)
                       throws JspTagException
Throws:
JspTagException

setReferids

public void setReferids(String r)
                 throws JspTagException
Throws:
JspTagException

addParameter

public void addParameter(String key,
                         Object value)
                  throws JspTagException
Specified by:
addParameter in interface ParamHandler
Throws:
JspTagException

setXsltSource

public void setXsltSource(Source xs)
The Xslt tag will call this, to inform this tag about the XSLT which must be done.


getGenerator

public Generator getGenerator()
Subtags can write themselves as XML to the DOM document of this tag. This functions returns this document.


wantXML

public final boolean wantXML()
Subtags need to know how they must communicate there content to this tag. If wantXML evaluates false, they must simply write to the page, and formatter will pick it up.


setCloud

public boolean setCloud(Cloud c)
return false if the cloud was set already (nothing happened);

Since:
MMBase-1.8.1

setPageContext

public void setPageContext(PageContext pageContext)
Specified by:
setPageContext in interface Tag
Overrides:
setPageContext in class ContextReferrerTag

doStartTag

public int doStartTag()
               throws JspTagException
Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspTagException

doAfterBody

public int doAfterBody()
                throws JspException
Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class BodyTagSupport
Throws:
JspException

doEndTag

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

doFinally

public void doFinally()
Specified by:
doFinally in interface TryCatchFinally
Overrides:
doFinally in class ContextReferrerTag

setOutputProperties

public void setOutputProperties(Properties properties)


MMBase 2.0-SNAPSHOT - null