com.ivata.mask.web.tag.util
Class CollectionAddTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.ivata.mask.web.tag.util.CollectionAddTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class CollectionAddTag
extends javax.servlet.jsp.tagext.TagSupport

This class is a wrapper tag to Collection.add.

Tag attributes:

attribute reqd. param. class description
name true String The name of the Collection you .want to add an element to. This should have been instantiated with page scope using the useBean tag.
value true Object The value of the object you want to add.

Since:
ivata masks 0.5 (2002-06-29)
Version:
$Revision: 1.2 $
Author:
Colin MacLeod colin.macleod@ivata.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
CollectionAddTag()
          Default constructor.
 
Method Summary
 int doStartTag()
          Performs the action of adding the value supplied to the Collection.
 java.lang.String getName()
          Get the name of the collection to add a new value to.
 java.lang.Object getValue()
          Get the value of the object to be added to the Colleciton.
 void setName(java.lang.String nameParam)
          Set the name of the colleciton to add a new value to.
 void setValue(java.lang.Object valueParam)
          Set the value of the object to be added to the Colleciton.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionAddTag

public CollectionAddTag()

Default constructor.

Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

Performs the action of adding the value supplied to the Collection.

This method is called when the JSP engine encounters the start tag, after the attributes are processed.

Scripting variables (if any) have their values set here.

Returns:
SKIP_BODY since this tag has no body.
Throws:
javax.servlet.jsp.JspException - if the Collection with the name specified does not exist at page scope.

getName

public final java.lang.String getName()

Get the name of the collection to add a new value to.

Returns:
the current value of the Collection name.

getValue

public final java.lang.Object getValue()

Get the value of the object to be added to the Colleciton.

Returns:
the current value of the object to be added.

setName

public final void setName(java.lang.String nameParam)

Set the name of the colleciton to add a new value to.

Parameters:
nameParam - the new value of the Collection name.

setValue

public final void setValue(java.lang.Object valueParam)

Set the value of the object to be added to the Colleciton.

Parameters:
valueParam - the new value of object to be added.


Copyright © 2001-2005 ivata limited. All Rights Reserved.