org.apache.commons.jelly.tags.core

## Class SetTag

- java.lang.Object
- - org.apache.commons.jelly.TagSupport
  - - org.apache.commons.jelly.tags.core.SetTag

All Implemented Interfaces:
  Tag

Deprecated.
Implemented as `TagScript` in `CoreTagLibrary`

    public class SetTag
    extends TagSupport

A tag which sets a variable from the result of an expression

Version:
  $Revision: 155420 $
Author:
  James Strachan

### Field Summary

### Fields inherited from class org.apache.commons.jelly.TagSupport

`body, context, parent`

### Constructor Summary

Constructors
Constructor and Description
`SetTag()` Deprecated.

### Method Summary

Methods
`void` `doTag(XMLOutput output)` Deprecated. Evaluates this tag after all the tags properties have been initialized.
`protected boolean` `isEmpty(Object value)` Deprecated.
`boolean` `isEncode()` Deprecated. Returns whether the body of this tag will be XML encoded or not.
`void` `setDefaultValue(Expression defaultValue)` Deprecated. Sets the default value to be used if the value exprsesion results in a null value or blank String
`void` `setEncode(boolean encode)` Deprecated. Sets whether the body of the tag should be XML encoded as text (so that < and > are encoded as &lt; and &gt;) or leave the text as XML which is the default.
`void` `setProperty(String property)` Deprecated. Sets the name of the property to set on the target object.
`protected void` `setPropertyValue(Object target, String property, Object value)` Deprecated.
`void` `setScope(String scope)` Deprecated. Sets the variable scope for this variable.
`void` `setTarget(Object target)` Deprecated. Sets the target object on which to set a property.
`void` `setValue(Expression value)` Deprecated. Sets the expression to evaluate.
`void` `setVar(String var)` Deprecated. Sets the variable name to define for this expression

### Methods inherited from class org.apache.commons.jelly.TagSupport

`findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SetTag

    public SetTag()

Deprecated.

### Method Detail

#### doTag

    public void doTag(XMLOutput output)
               throws JellyTagException

Deprecated.
Description copied from interface: `Tag`
Evaluates this tag after all the tags properties have been initialized.

Throws:
  `JellyTagException`

#### setVar

    public void setVar(String var)

Deprecated.
Sets the variable name to define for this expression

#### setScope

    public void setScope(String scope)

Deprecated.
Sets the variable scope for this variable. For example setting this value to 'parent' will set this value in the parent scope. When Jelly is run from inside a Servlet environment then other scopes will be available such as 'request', 'session' or 'application'. Other applications may implement their own custom scopes.

#### setValue

    public void setValue(Expression value)

Deprecated.
Sets the expression to evaluate.

#### setDefaultValue

    public void setDefaultValue(Expression defaultValue)

Deprecated.
Sets the default value to be used if the value exprsesion results in a null value or blank String

#### setTarget

    public void setTarget(Object target)

Deprecated.
Sets the target object on which to set a property.

#### setProperty

    public void setProperty(String property)

Deprecated.
Sets the name of the property to set on the target object.

#### isEncode

    public boolean isEncode()

Deprecated.
Returns whether the body of this tag will be XML encoded or not.

#### setEncode

    public void setEncode(boolean encode)

Deprecated.
Sets whether the body of the tag should be XML encoded as text (so that < and > are encoded as &lt; and &gt;) or leave the text as XML which is the default. This is only used if this tag is specified with no value so that the text body of this tag is used as the body.

#### setPropertyValue

    protected void setPropertyValue(Object target,
                        String property,
                        Object value)

Deprecated.

#### isEmpty

    protected boolean isEmpty(Object value)

Deprecated.

Parameters:
  `value` -
Returns:
  true if the given value is null or an empty String