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

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

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

This tag is used as a simple way to set an property value on the class java.util.Property as used by all the webgui tabs

Tag attributes:

attribute reqd. param. class description
name true String The name of the java.util.Properties where the property should be set.
property true String The name of the property to set.
value true String The new value for the property.

Since:
ivata masks 0.5 (2001-12-16)
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
SetPropertyTag()
          Default constructor.
 
Method Summary
 int doStartTag()
          This is where the property actually gets set, whent the class encounters the closed, start tag.
 java.lang.String getName()
          Get the value supplied to the attribute 'name'.
 java.util.Properties getProperties()
          Get the actual properties in which the value will be set.
 java.lang.String getProperty()
          Get the value supplied to the attribute 'property'.
 java.lang.String getValue()
          Get the value supplied to the attribute 'value'.
 void setName(java.lang.String nameParam)
          Set the value supplied to the attribute 'name'.
 void setProperties(java.util.Properties propertiesParam)
          Set the actual properties in which the value will be set.
 void setProperty(java.lang.String propertyParam)
          Set the value supplied to the attribute 'property'.
 void setValue(java.lang.String valueParam)
          Set the value supplied to the attribute 'value'.
 
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

SetPropertyTag

public SetPropertyTag()

Default constructor.

Method Detail

doStartTag

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

This is where the property actually gets set, whent the class encounters the closed, start tag.

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 - thrown if there is no valid Properties in this object.

getName

public final java.lang.String getName()

Get the value supplied to the attribute 'name'.

This attribute represents the name of the java.util.Properties where the property should be set.

Returns:
the value supplied to the tag attribute 'name'

getProperties

public final java.util.Properties getProperties()

Get the actual properties in which the value will be set.

Returns:
the current value of properties.

getProperty

public final java.lang.String getProperty()

Get the value supplied to the attribute 'property'.

This attribute represents the name of the property to set.

Returns:
the value supplied to the tag attribute 'property'

getValue

public final java.lang.String getValue()

Get the value supplied to the attribute 'value'.

This attribute represents the new value for the property.

Returns:
the value supplied to the tag attribute 'value'

setName

public final void setName(java.lang.String nameParam)
                   throws javax.servlet.jsp.JspException

Set the value supplied to the attribute 'name'.

This attribute represents the name of the java.util.Properties where the property should be set. Calling this method will cause the class to look for a new properties objec with this name first at page and then session scope. If none is found an exception is thrown.

Parameters:
nameParam - the new value supplied to the tag attribute 'name'
Throws:
javax.servlet.jsp.JspException - thrown if there is no properties instance with this name at either page or session scope.

setProperties

public final void setProperties(java.util.Properties propertiesParam)

Set the actual properties in which the value will be set.

Parameters:
propertiesParam - the new value of properties instance for which the value should be set.

setProperty

public final void setProperty(java.lang.String propertyParam)

Set the value supplied to the attribute 'property'.

This attribute represents the name of the property to set.

Parameters:
propertyParam - the name or key of the property to set in the properties.

setValue

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

Set the value supplied to the attribute 'value'.

This attribute represents the new value for the property.

Parameters:
valueParam - the new value supplied to the tag attribute 'value'


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