/** Another constructor for selection lists, where these have been precomputed **/ public static UIOutputMany make(String[] values) { UIOutputMany togo = new UIOutputMany(); if (values != null) { togo.setValue(values); } return togo; } }
/** A constructor suitable for the value lists appearing in selection controls */ public static UIOutputMany make(String valuebinding, String resolver) { UIOutputMany togo = new UIOutputMany(); togo.valuebinding = new ELReference(valuebinding); togo.resolver = new ELReference(resolver); return togo; }
/** Creates a selection control without a value binding, either * non-submitting, or suitable for use in a GET form */ public static UISelect make(UIContainer tofill, String ID, String[] values, String[] labels, String value, boolean willinput) { UISelect togo = new UISelect(); togo.optionlist = new UIOutputMany(); togo.ID = ID; togo.optionlist.setValue(values); togo.optionnames = new UIBoundList(); togo.optionnames.setValue(labels); togo.selection = new UIBoundString(); if (value != null) { ((UIBoundString) togo.selection).setValue(value); } togo.selection.willinput = willinput; tofill.addComponent(togo); RSFUtil.updateChildIDs(togo); return togo; }