FileDocCategorySizeDatePackage
ObjectValueTag.javaAPI DocExample2172Thu Jun 28 16:14:16 BST 2001com.ora.jsp.tags.sql.value

ObjectValueTag

public class ObjectValueTag extends ValueTag
This class is a custom action intended to be used in the body of a sqlQuery or an sqlUpdate action element. It adds the specified value to its parent's value list.
author
Hans Bergsten, Gefion software
version
1.0

Fields Summary
private Object
value
Constructors Summary
Methods Summary
public intdoEndTag()
Gets the value, specified by the value attribute, the stringValue attribute, the param attribute, or the name and property attributes, and adds it to the parent's value list.

        if (stringValue != null) {
            value = stringValue;
        }
        else if (param != null) {
            String paramValue = getParameter(param);
            value = paramValue;
        }
        else if (name != null) {
            value = getObject(name, property);
        }
        ValueTagParent parent = 
            (ValueTagParent) findAncestorWithClass(this, ValueTagParent.class);
        if (parent == null) {
            throw new JspException("The sqlObjectValue action is not " +
                "enclosed by a supported action type");
        }
        parent.addValue(new ObjectValue(value));
        return EVAL_PAGE;
    
private java.lang.ObjectgetObject(java.lang.String beanName, java.lang.String propertyName)

        String stringValue = null;
        Object bean = getBean(beanName);
        Method readMethod = getPropertyReadMethod(bean, propertyName);
        Class returnType = readMethod.getReturnType();
        return getValue(bean, readMethod, propertyName);
    
public voidrelease()
Releases all instance variables.

        value = null;
        super.release();
    
public voidsetValue(java.lang.Object value)
Sets the value property.

        this.value = value;