FileDocCategorySizeDatePackage
DoubleListUIBean.javaAPI DocExample19048Mon Jul 23 13:26:36 BST 2007org.apache.struts2.components

DoubleListUIBean

public abstract class DoubleListUIBean extends ListUIBean
DoubleListUIBean is the standard superclass of all Struts double list handling components.

Note that the doublelistkey and doublelistvalue attribute will default to "key" and "value" respectively only when the doublelist attribute is evaluated to a Map or its decendant. Other thing else, will result in doublelistkey and doublelistvalue to be null and not used.

Fields Summary
protected String
emptyOption
protected String
headerKey
protected String
headerValue
protected String
multiple
protected String
size
protected String
doubleList
protected String
doubleListKey
protected String
doubleListValue
protected String
doubleName
protected String
doubleValue
protected String
formName
protected String
doubleId
protected String
doubleDisabled
protected String
doubleMultiple
protected String
doubleSize
protected String
doubleHeaderKey
protected String
doubleHeaderValue
protected String
doubleEmptyOption
protected String
doubleCssClass
protected String
doubleCssStyle
protected String
doubleOnclick
protected String
doubleOndblclick
protected String
doubleOnmousedown
protected String
doubleOnmouseup
protected String
doubleOnmouseover
protected String
doubleOnmousemove
protected String
doubleOnmouseout
protected String
doubleOnfocus
protected String
doubleOnblur
protected String
doubleOnkeypress
protected String
doubleOnkeydown
protected String
doubleOnkeyup
protected String
doubleOnselect
protected String
doubleOnchange
protected String
doubleAccesskey
Constructors Summary
public DoubleListUIBean(com.opensymphony.xwork2.util.ValueStack stack, HttpServletRequest request, HttpServletResponse response)

        super(stack, request, response);
    
Methods Summary
public voidevaluateExtraParams()

        super.evaluateExtraParams();

        //Object doubleName = null;

        if (emptyOption != null) {
            addParameter("emptyOption", findValue(emptyOption, Boolean.class));
        }

        if (multiple != null) {
            addParameter("multiple", findValue(multiple, Boolean.class));
        }

        if (size != null) {
            addParameter("size", findString(size));
        }

        if ((headerKey != null) && (headerValue != null)) {
            addParameter("headerKey", findString(headerKey));
            addParameter("headerValue", findString(headerValue));
        }


        if (doubleMultiple != null) {
            addParameter("doubleMultiple", findValue(doubleMultiple, Boolean.class));
        }

        if (doubleSize != null) {
            addParameter("doubleSize", findString(doubleSize));
        }

        if (doubleDisabled != null) {
            addParameter("doubleDisabled", findValue(doubleDisabled, Boolean.class));
        }

        if (doubleName != null) {
            addParameter("doubleName", findString(this.doubleName));
        }

        if (doubleList != null) {
            addParameter("doubleList", doubleList);
        }

        Object tmpDoubleList = findValue(doubleList);
        if (doubleListKey != null) {
            addParameter("doubleListKey", doubleListKey);
        }else if (tmpDoubleList instanceof Map) {
            addParameter("doubleListKey", "key");
        }

        if (doubleListValue != null) {
            if (altSyntax()) {
                // the same logic as with findValue(String)
                // if value start with %{ and end with }, just cut it off!
                if (doubleListValue.startsWith("%{") && doubleListValue.endsWith("}")) {
                    doubleListValue = doubleListValue.substring(2, doubleListValue.length() - 1);
                }
            }

            addParameter("doubleListValue", doubleListValue);
        }else if (tmpDoubleList instanceof Map) {
            addParameter("doubleListValue", "value");
        }


        if (formName != null) {
            addParameter("formName", findString(formName));
        } else {
            // ok, let's look it up
            Component form = findAncestor(Form.class);
            if (form != null) {
                addParameter("formName", form.getParameters().get("name"));
            }
        }

        Class valueClazz = getValueClassType();

        if (valueClazz != null) {
            if (doubleValue != null) {
                addParameter("doubleNameValue", findValue(doubleValue, valueClazz));
            } else if (doubleName != null) {
                addParameter("doubleNameValue", findValue(doubleName.toString(), valueClazz));
            }
        } else {
            if (doubleValue != null) {
                addParameter("doubleNameValue", findValue(doubleValue));
            } else if (doubleName != null) {
                addParameter("doubleNameValue", findValue(doubleName.toString()));
            }
        }

        Form form = (Form) findAncestor(Form.class);
        if (doubleId != null) {
            // this check is needed for backwards compatibility with 2.1.x
            if (altSyntax()) {
                addParameter("doubleId", findString(doubleId));
            } else {
                addParameter("doubleId", doubleId);
            }
        } else if (form != null) {
            addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
        } else {
            addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
        }

        if (doubleOnclick != null) {
            addParameter("doubleOnclick", findString(doubleOnclick));
        }

        if (doubleOndblclick != null) {
            addParameter("doubleOndblclick", findString(doubleOndblclick));
        }

        if (doubleOnmousedown != null) {
            addParameter("doubleOnmousedown", findString(doubleOnmousedown));
        }

        if (doubleOnmouseup != null) {
            addParameter("doubleOnmouseup", findString(doubleOnmouseup));
        }

        if (doubleOnmouseover != null) {
            addParameter("doubleOnmouseover", findString(doubleOnmouseover));
        }

        if (doubleOnmousemove != null) {
            addParameter("doubleOnmousemove", findString(doubleOnmousemove));
        }

        if (doubleOnmouseout != null) {
            addParameter("doubleOnmouseout", findString(doubleOnmouseout));
        }

        if (doubleOnfocus != null) {
            addParameter("doubleOnfocus", findString(doubleOnfocus));
        }

        if (doubleOnblur != null) {
            addParameter("doubleOnblur", findString(doubleOnblur));
        }

        if (doubleOnkeypress != null) {
            addParameter("doubleOnkeypress", findString(doubleOnkeypress));
        }

        if (doubleOnkeydown != null) {
            addParameter("doubleOnkeydown", findString(doubleOnkeydown));
        }

        if (doubleOnselect != null) {
            addParameter("doubleOnselect", findString(doubleOnselect));
        }

        if (doubleOnchange != null) {
            addParameter("doubleOnchange", findString(doubleOnchange));
        }

        if (doubleCssClass != null) {
            addParameter("doubleCss", findString(doubleCssClass));
        }

        if (doubleCssStyle != null) {
            addParameter("doubleStyle", findString(doubleCssStyle));
        }

        if (doubleHeaderKey != null && doubleHeaderValue != null) {
            addParameter("doubleHeaderKey", findString(doubleHeaderKey));
            addParameter("doubleHeaderValue", findString(doubleHeaderValue));
        }

        if (doubleEmptyOption != null) {
            addParameter("doubleEmptyOption", findValue(doubleEmptyOption, Boolean.class));
        }

        if (doubleAccesskey != null) {
            addParameter("doubleAccesskey", findString(doubleAccesskey));
        }
    
public java.lang.StringgetDoubleCssClass()

        return doubleCssClass;
    
public java.lang.StringgetDoubleCssStyle()

        return doubleCssStyle;
    
public java.lang.StringgetDoubleDisabled()

        return doubleDisabled;
    
public java.lang.StringgetDoubleEmptyOption()

        return this.doubleEmptyOption;
    
public java.lang.StringgetDoubleHeaderKey()

        return doubleHeaderKey;
    
public java.lang.StringgetDoubleHeaderValue()

        return doubleHeaderValue;
    
public java.lang.StringgetDoubleId()

        return doubleId;
    
public java.lang.StringgetDoubleList()

        return doubleList;
    
public java.lang.StringgetDoubleListKey()

        return doubleListKey;
    
public java.lang.StringgetDoubleListValue()

        return doubleListValue;
    
public java.lang.StringgetDoubleMultiple()

        return doubleMultiple;
    
public java.lang.StringgetDoubleName()

        return doubleName;
    
public java.lang.StringgetDoubleOnblur()

        return doubleOnblur;
    
public java.lang.StringgetDoubleOnchange()

        return doubleOnchange;
    
public java.lang.StringgetDoubleOnclick()

        return doubleOnclick;
    
public java.lang.StringgetDoubleOndblclick()

        return doubleOndblclick;
    
public java.lang.StringgetDoubleOnfocus()

        return doubleOnfocus;
    
public java.lang.StringgetDoubleOnkeydown()

        return doubleOnkeydown;
    
public java.lang.StringgetDoubleOnkeypress()

        return doubleOnkeypress;
    
public java.lang.StringgetDoubleOnkeyup()

        return doubleOnkeyup;
    
public java.lang.StringgetDoubleOnmousedown()

        return doubleOnmousedown;
    
public java.lang.StringgetDoubleOnmousemove()

        return doubleOnmousemove;
    
public java.lang.StringgetDoubleOnmouseout()

        return doubleOnmouseout;
    
public java.lang.StringgetDoubleOnmouseover()

        return doubleOnmouseover;
    
public java.lang.StringgetDoubleOnmouseup()

        return doubleOnmouseup;
    
public java.lang.StringgetDoubleOnselect()

        return doubleOnselect;
    
public java.lang.StringgetDoubleSize()

        return doubleSize;
    
public java.lang.StringgetDoubleValue()

        return doubleValue;
    
public java.lang.StringgetFormName()

        return formName;
    
public voidsetDoubleAccesskey(java.lang.String doubleAccesskey)

        this.doubleAccesskey = doubleAccesskey;
    
public voidsetDoubleCssClass(java.lang.String doubleCssClass)

        this.doubleCssClass = doubleCssClass;
    
public voidsetDoubleCssStyle(java.lang.String doubleCssStyle)

        this.doubleCssStyle = doubleCssStyle;
    
public voidsetDoubleDisabled(java.lang.String doubleDisabled)

        this.doubleDisabled = doubleDisabled;
    
public voidsetDoubleEmptyOption(java.lang.String doubleEmptyOption)

        this.doubleEmptyOption = doubleEmptyOption;
    
public voidsetDoubleHeaderKey(java.lang.String doubleHeaderKey)

        this.doubleHeaderKey = doubleHeaderKey;
    
public voidsetDoubleHeaderValue(java.lang.String doubleHeaderValue)

        this.doubleHeaderValue = doubleHeaderValue;
    
public voidsetDoubleId(java.lang.String doubleId)

        this.doubleId = doubleId;
    
public voidsetDoubleList(java.lang.String doubleList)

        this.doubleList = doubleList;
    
public voidsetDoubleListKey(java.lang.String doubleListKey)

        this.doubleListKey = doubleListKey;
    
public voidsetDoubleListValue(java.lang.String doubleListValue)

        this.doubleListValue = doubleListValue;
    
public voidsetDoubleMultiple(java.lang.String doubleMultiple)

        this.doubleMultiple = doubleMultiple;
    
public voidsetDoubleName(java.lang.String doubleName)

        this.doubleName = doubleName;
    
public voidsetDoubleOnblur(java.lang.String doubleOnblur)

        this.doubleOnblur = doubleOnblur;
    
public voidsetDoubleOnchange(java.lang.String doubleOnchange)

        this.doubleOnchange = doubleOnchange;
    
public voidsetDoubleOnclick(java.lang.String doubleOnclick)

        this.doubleOnclick = doubleOnclick;
    
public voidsetDoubleOndblclick(java.lang.String doubleOndblclick)

        this.doubleOndblclick = doubleOndblclick;
    
public voidsetDoubleOnfocus(java.lang.String doubleOnfocus)

        this.doubleOnfocus = doubleOnfocus;
    
public voidsetDoubleOnkeydown(java.lang.String doubleOnkeydown)

        this.doubleOnkeydown = doubleOnkeydown;
    
public voidsetDoubleOnkeypress(java.lang.String doubleOnkeypress)

        this.doubleOnkeypress = doubleOnkeypress;
    
public voidsetDoubleOnkeyup(java.lang.String doubleOnkeyup)

        this.doubleOnkeyup = doubleOnkeyup;
    
public voidsetDoubleOnmousedown(java.lang.String doubleOnmousedown)

        this.doubleOnmousedown = doubleOnmousedown;
    
public voidsetDoubleOnmousemove(java.lang.String doubleOnmousemove)

        this.doubleOnmousemove = doubleOnmousemove;
    
public voidsetDoubleOnmouseout(java.lang.String doubleOnmouseout)

        this.doubleOnmouseout = doubleOnmouseout;
    
public voidsetDoubleOnmouseover(java.lang.String doubleOnmouseover)

        this.doubleOnmouseover = doubleOnmouseover;
    
public voidsetDoubleOnmouseup(java.lang.String doubleOnmouseup)

        this.doubleOnmouseup = doubleOnmouseup;
    
public voidsetDoubleOnselect(java.lang.String doubleOnselect)

        this.doubleOnselect = doubleOnselect;
    
public voidsetDoubleSize(java.lang.String doubleSize)

        this.doubleSize = doubleSize;
    
public voidsetDoubleValue(java.lang.String doubleValue)

        this.doubleValue = doubleValue;
    
public voidsetEmptyOption(java.lang.String emptyOption)

        this.emptyOption = emptyOption;
    
public voidsetFormName(java.lang.String formName)

        this.formName = formName;
    
public voidsetHeaderKey(java.lang.String headerKey)

        this.headerKey = headerKey;
    
public voidsetHeaderValue(java.lang.String headerValue)

        this.headerValue = headerValue;
    
public voidsetMultiple(java.lang.String multiple)

        // TODO: Passing a Collection may work too?
        this.multiple = multiple;
    
public voidsetSize(java.lang.String size)

        this.size = size;