org.mmbase.bridge.jsp.taglib
Class FieldTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--javax.servlet.jsp.tagext.BodyTagSupport
              |
              +--org.mmbase.bridge.jsp.taglib.ContextReferrerTag
                    |
                    +--org.mmbase.bridge.jsp.taglib.CloudReferrerTag
                          |
                          +--org.mmbase.bridge.jsp.taglib.NodeReferrerTag
                                |
                                +--org.mmbase.bridge.jsp.taglib.FieldReferrerTag
                                      |
                                      +--org.mmbase.bridge.jsp.taglib.FieldTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, FieldProvider, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, TagIdentifier, Writer
Direct Known Subclasses:
ImageTag, NodeFieldTag, SetFieldTag

public class FieldTag
extends FieldReferrerTag
implements FieldProvider, Writer

The FieldTag can be used as a child of a 'NodeProvider' tag.

Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  Field field
           
protected  java.lang.String fieldName
           
protected  WriterHelper helper
           
protected  java.lang.String name
           
protected  Node node
           
protected  NodeProvider nodeProvider
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, PAGE_CATEGORY, pageContextTag, referid, writerid
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, 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
FieldTag()
           
 
Method Summary
protected  java.lang.String convert(java.lang.String s)
          Does something with the generated output.
 int doAfterBody()
           
 int doEndTag()
          write the value of the field.
 int doStartTag()
           
 Field getFieldVar()
           
 Node getNodeVar()
          A fieldprovider also provides a node.
 java.lang.Object getWriterValue()
          Subtags of 'Writer' tag can request the value.
 void haveBody()
          To be used by child tags.
protected  void setFieldVar()
           
protected  void setFieldVar(java.lang.String n)
           
 void setJspvar(java.lang.String j)
          JspVar to Create, and write to
 void setModified()
           
 void setName(java.lang.String n)
           
 void setVartype(java.lang.String t)
          Type of the jspvar.
 void setWrite(java.lang.String w)
          Wether to write to page or not.
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.FieldReferrerTag
findFieldProvider, getField, setField
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
findNodeProvider, findNodeProvider, getNode, setNode
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
findCloudProvider, findCloudProvider, getCloud, getCloudContext, getNode, getNodeOrNull, setCloud
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
findParentTag, findParentTag, findWriter, findWriter, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContextTag, getObject, getReferid, getString, release, setContext, setPageContext, setReferid, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, 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.TagIdentifier
getId
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

helper

protected WriterHelper helper

node

protected Node node

nodeProvider

protected NodeProvider nodeProvider

field

protected Field field

fieldName

protected java.lang.String fieldName

name

protected java.lang.String name
Constructor Detail

FieldTag

public FieldTag()
Method Detail

setVartype

public void setVartype(java.lang.String t)
                throws javax.servlet.jsp.JspTagException
Description copied from interface: Writer
Type of the jspvar.
Specified by:
setVartype in interface Writer

setJspvar

public void setJspvar(java.lang.String j)
Description copied from interface: Writer
JspVar to Create, and write to
Specified by:
setJspvar in interface Writer

setWrite

public void setWrite(java.lang.String w)
              throws javax.servlet.jsp.JspTagException
Description copied from interface: Writer
Wether to write to page or not. This has to default to 'false' if the tag has a body, and to 'true' if it hasn't.
Specified by:
setWrite in interface Writer

getWriterValue

public java.lang.Object getWriterValue()
Description copied from interface: Writer
Subtags of 'Writer' tag can request the value.
Specified by:
getWriterValue in interface Writer

haveBody

public void haveBody()
Description copied from interface: Writer
To be used by child tags. If they are present, they say to the writer tag that it has body, which it can use to determine a default for the write property.
Specified by:
haveBody in interface Writer

setName

public void setName(java.lang.String n)
             throws javax.servlet.jsp.JspTagException

getNodeVar

public Node getNodeVar()
                throws javax.servlet.jsp.JspTagException
A fieldprovider also provides a node.
Specified by:
getNodeVar in interface FieldProvider

setModified

public void setModified()
Specified by:
setModified in interface FieldProvider

getFieldVar

public Field getFieldVar()
Specified by:
getFieldVar in interface FieldProvider
Following copied from interface: org.mmbase.bridge.jsp.taglib.FieldProvider
Returns:
the field contained in the tag

setFieldVar

protected void setFieldVar(java.lang.String n)
                    throws javax.servlet.jsp.JspTagException

setFieldVar

protected void setFieldVar()
                    throws javax.servlet.jsp.JspTagException

convert

protected java.lang.String convert(java.lang.String s)
                            throws javax.servlet.jsp.JspTagException
Does something with the generated output. This default implementation does nothing, but extending classes could override this function.

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
write the value of the field.
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport


MMBase build 1.6.5.20030923