org.mmbase.bridge.jsp.taglib
Class FieldTag

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.NodeReferrerTag
                      extended by org.mmbase.bridge.jsp.taglib.FieldReferrerTag
                          extended by org.mmbase.bridge.jsp.taglib.FieldTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally, FieldProvider, TagIdentifier, Writer
Direct Known Subclasses:
ImageTag, SetFieldTag

public class FieldTag
extends FieldReferrerTag
implements FieldProvider, Writer

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

Version:
$Id: FieldTag.java 37164 2009-07-22 12:35:40Z michiel $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  Field field
           
protected  String fieldName
           
protected  Attribute name
           
protected  Attribute notfound
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.FieldReferrerTag
parentFieldId
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
parentNodeId
 
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 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  String convert(String s)
          Does something with the generated output.
 int doAfterBody()
           
 int doEndTag()
          write the value of the field.
 void doFinally()
           
 int doStartTag()
           
 Field getFieldVar()
           
 Node getNodeVar()
          A fieldprovider also provides a node.
protected  void handleEditTag()
          Method to handle the EditTag if it is present around fields and their nodes.
protected  void setFieldVar()
           
protected  void setFieldVar(String n)
           
 void setName(String n)
           
 void setNotfound(String i)
           
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.FieldReferrerTag
findFieldProvider, findFieldProvider, getField, setField
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.NodeReferrerTag
fillStandardParameters, findNode, findNodeProvider, findNodeProvider, getCloudVar, getLocale, getNode, getNode, getNodeFromPageContext, initTag, setElement, setNode
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.CloudReferrerTag
findCloudProvider, findCloudProvider, getCloudContext, 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, setPageContext, 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 org.mmbase.bridge.jsp.taglib.TagIdentifier
getId
 
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

field

protected Field field

fieldName

protected String fieldName

name

protected Attribute name

notfound

protected Attribute notfound
Constructor Detail

FieldTag

public FieldTag()
Method Detail

setName

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

setNotfound

public void setNotfound(String i)
                 throws JspTagException
Throws:
JspTagException

getNodeVar

public Node getNodeVar()
                throws JspTagException
A fieldprovider also provides a node.

Specified by:
getNodeVar in interface FieldProvider
Throws:
JspTagException

getFieldVar

public Field getFieldVar()
Specified by:
getFieldVar in interface FieldProvider
Returns:
the field contained in the tag

setFieldVar

protected void setFieldVar(String n)
                    throws JspTagException
Throws:
JspTagException

setFieldVar

protected void setFieldVar()
                    throws JspTagException
Throws:
JspTagException

convert

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

Throws:
JspTagException

handleEditTag

protected void handleEditTag()
Method to handle the EditTag if it is present around fields and their nodes.

When the FieldTag finds itself inside an EditTag then it will register its contents with the EditTag. The EditTag can provide access to an editor. Not only the field and its nodes will be registered but also the query it originated from. It passes these to the method EditTag#registerField(Query query, int nodenr, String fieldName).

Since:
MMBase-1.8
See Also:
EditTag
To Do:
EXPERIMENTAL

doStartTag

public int doStartTag()
               throws JspException
Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class NodeReferrerTag
Throws:
JspException

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
write the value of the field.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class NodeReferrerTag
Throws:
JspTagException

doFinally

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


MMBase 2.0-SNAPSHOT - null