if (valueOrValues != null) { if (valueOrValues.getClass().isArray()) { for (Object value : (Object[]) valueOrValues) { getAttributes().put("value", format(value)); writeSingletonTag(getPageContext().getOut(), "input"); } } else if (valueOrValues instanceof Collection) { for (Object value : (Collection) valueOrValues) { getAttributes().put("value", format(value)); writeSingletonTag(getPageContext().getOut(), "input"); } } else { getAttributes().put("value", format(valueOrValues));
if (valueOrValues == null) { getAttributes().put("value", ""); writeSingletonTag(getPageContext().getOut(), "input"); } else if (valueOrValues.getClass().isArray()) { for (Object value : (Object[]) valueOrValues) { getAttributes().put("value", format(value));
    public int doEndInputTag() throws JspException {        // Find out if we have a value from the PopulationStrategy        Object valueOrValues = getOverrideValueOrValues();        // Figure out how many times to write it out        if (valueOrValues != null) {            if (valueOrValues.getClass().isArray()) {                for (Object value : (Object[]) valueOrValues) {                    getAttributes().put("value", format(value));                    writeSingletonTag(getPageContext().getOut(), "input");                }            }            else if (valueOrValues instanceof Collection) {                for (Object value : (Collection) valueOrValues) {                    getAttributes().put("value", format(value));                    writeSingletonTag(getPageContext().getOut(), "input");                }            }            else {                getAttributes().put("value", format(valueOrValues));                writeSingletonTag(getPageContext().getOut(), "input");            }        }        // Clear out the value from the attributes        getAttributes().remove("value");        return EVAL_PAGE;    }