net.sf.jameleon
Class VariableValueTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by net.sf.jameleon.VariableTag
          extended by net.sf.jameleon.VariableValueTag
All Implemented Interfaces:
Tag

public class VariableValueTag
extends VariableTag

used only as a child of <map-variable/>, it allows the ability to map one or more text values to a variable. The variableType of <map-variable/> can be used to when defining multiple values. For example:


 <testcase xmlns="jelly:jameleon">

   <some-session application="someApp" beginSession="true">
       <some-tag-that-uses-context-variables
           functionId="Verify successful navigation, using a different variable.">
           <map-variable toVariable="resultsText" variableType="list">
               <variable-value>value 1</variable-value>
               <variable-value>value 2</variable-value>
               <variable-value>value 3</variable-value>
               <variable-value>value 4</variable-value>
           </map-variable/>
       </some-tag-that-uses-context-variables>
   </some-session>
 </testcase>
 

Tag Name: <variable-value>

Field Summary
 
Fields inherited from class net.sf.jameleon.VariableTag
fromVariable, LIST, STRING, tct, toVariable, value, variableType
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
VariableValueTag()
           
 
Method Summary
 void doTag(XMLOutput out)
          An implementation of the doTag method provided by the TagSupport class.
 String getValue()
           
 void setDecodeXMLToText(boolean decodeXMLToText)
           
 void setValue(String value)
          Sets the variable value.
protected  void validate()
          Used to validate everything is set up correctly.
 
Methods inherited from class net.sf.jameleon.VariableTag
init, setVariable, setVariableValue
 
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

VariableValueTag

public VariableValueTag()
Method Detail

doTag

public void doTag(XMLOutput out)
           throws MissingAttributeException,
                  JellyTagException
An implementation of the doTag method provided by the TagSupport class. Maps the value in the fromVariable over to the original variable name, toVariable.

Specified by:
doTag in interface Tag
Overrides:
doTag in class VariableTag
Throws:
MissingAttributeException
JellyTagException

validate

protected void validate()
                 throws MissingAttributeException,
                        JellyTagException
Used to validate everything is set up correctly.

Overrides:
validate in class VariableTag
Throws:
MissingAttributeException - - When a required attribute isn't set.
JellyTagException - - When this tag is used out of context.

getValue

public String getValue()
Returns:
The variable name to be mapped to the fromVariable or the originally supported variable name that has a set method for it in the function point.

setValue

public void setValue(String value)
Sets the variable value.

Parameters:
value - - the variable value.

setDecodeXMLToText

public void setDecodeXMLToText(boolean decodeXMLToText)


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.