org.mmbase.bridge.jsp.taglib
Class FormatterTag

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.FormatterTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, Writer

public class FormatterTag
extends ContextReferrerTag
implements Writer

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

Since:
MMBase-1.6
Version:
$Id: FormatterTag.java,v 1.37.2.3 2004/07/05 17:19:58 michiel Exp $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  Attribute format
           
protected  Attribute options
           
protected  int timerHandle
          A handle necessary when using the Timer Tag;
protected  Attribute wants
           
protected  Attribute xslt
           
protected  javax.xml.transform.Source xsltSource
           
 
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
FormatterTag()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
           
 int doStartTag()
           
protected  int getFormat()
           
 Generator getGenerator()
          Subtags can write themselves as XML to the DOM document of this tag.
protected  int getWants()
           
 void setFormat(java.lang.String f)
          Predefined formattings.
 void setOptions(java.lang.String o)
          The 'options' attribute can be used to provide option to the transformation to be done
 void setPageContext(javax.servlet.jsp.PageContext pageContext)
           
 void setWants(java.lang.String w)
           
 void setXslt(java.lang.String x)
          You can give the path the the XSLT-file by this attribute.
 void setXsltSource(javax.xml.transform.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.ContextReferrerTag
findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getId, getLocale, getObject, getPageContext, getReferid, getString, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, 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 org.mmbase.bridge.jsp.taglib.Writer
getWriterValue, haveBody, setEscape, setJspvar, setVartype, setWrite
 
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

xsltSource

protected javax.xml.transform.Source xsltSource

timerHandle

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

Constructor Detail

FormatterTag

public FormatterTag()
Method Detail

setXslt

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

Throws:
javax.servlet.jsp.JspTagException

setFormat

public void setFormat(java.lang.String f)
               throws javax.servlet.jsp.JspTagException
Predefined formattings.

Throws:
javax.servlet.jsp.JspTagException

getFormat

protected int getFormat()
                 throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setOptions

public void setOptions(java.lang.String o)
                throws javax.servlet.jsp.JspTagException
The 'options' attribute can be used to provide option to the transformation to be done

Throws:
javax.servlet.jsp.JspTagException

setWants

public void setWants(java.lang.String w)
              throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

getWants

protected int getWants()
                throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setXsltSource

public void setXsltSource(javax.xml.transform.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.


setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pageContext)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag
Overrides:
setPageContext in class ContextReferrerTag

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspTagException

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
javax.servlet.jsp.JspTagException


MMBase build 1.7.1.20041002