public void evaluateExtraParams()

in core/src/main/java/org/apache/struts2/components/InputTransferSelect.java [104:199]


    public void evaluateExtraParams() {
        super.evaluateExtraParams();

        if (StringUtils.isBlank(size)) {
            addParameter("size", "5");
        }

        if (StringUtils.isBlank(multiple)) {
            addParameter("multiple", Boolean.TRUE);
        }

        // allowUpDown
        addParameter("allowUpDown", allowUpDown != null ? findValue(allowUpDown, Boolean.class) : Boolean.TRUE);

        // allowRemoveAll
        addParameter("allowRemoveAll", allowRemoveAll != null ? findValue(allowRemoveAll, Boolean.class) : Boolean.TRUE);


        // leftTitle
        if (leftTitle != null) {
            addParameter("leftTitle", findValue(leftTitle, String.class));
        }

        // rightTitle
        if (rightTitle != null) {
            addParameter("rightTitle", findValue(rightTitle, String.class));
        }


        // buttonCssClass
        if (StringUtils.isNotBlank(buttonCssClass)) {
            addParameter("buttonCssClass", buttonCssClass);
        }

        // buttonCssStyle
        if (StringUtils.isNotBlank(buttonCssStyle)) {
            addParameter("buttonCssStyle", buttonCssStyle);
        }

        // addLabel
        addParameter("addLabel", addLabel != null ? findValue(addLabel, String.class) : "->" );

        // removeLabel
        addParameter("removeLabel", removeLabel != null ? findValue(removeLabel, String.class) : "<-");

        // removeAllLabel
        addParameter("removeAllLabel", removeAllLabel != null ? findValue(removeAllLabel, String.class) : "<<--");


        // upLabel
        addParameter("upLabel", upLabel != null ? findValue(upLabel, String.class) : "^");


        // leftDownLabel
        addParameter("downLabel", downLabel != null ? findValue(downLabel, String.class) : "v");

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



        // inform the form component our select tag infos, so they know how to select
        // its elements upon onSubmit
        Form formAncestor = (Form) findAncestor(Form.class);
        if (formAncestor != null) {

            // inform ancestor form that we are having a customOnSubmit (see form-close.ftl [simple theme])
            enableAncestorFormCustomOnsubmit();


            // key -> select tag id, value -> headerKey (if exists)
            Map formInputtransferselectIds = (Map) formAncestor.getAttributes().get("inputtransferselectIds");

            // init lists
            if (formInputtransferselectIds == null) {
                formInputtransferselectIds = new LinkedHashMap();
            }

            // id
            String tmpId = (String) getAttributes().get("id");
            String tmpHeaderKey = (String) getAttributes().get("headerKey");
            if (tmpId != null && (! formInputtransferselectIds.containsKey(tmpId))) {
                formInputtransferselectIds.put(tmpId, tmpHeaderKey);
            }

            formAncestor.getAttributes().put("inputtransferselectIds", formInputtransferselectIds);

        }
        else {
            if (LOG.isWarnEnabled()) {
                LOG.warn("form enclosing inputtransferselect {} not found, auto select upon form submit of inputtransferselect will not work", this);
            }
        }
    }