/** A "skeleton" make method to prepare for more complex constructions */ public static UISelect make(UIContainer tofill, String ID) { UISelect togo = new UISelect(); togo.ID = ID; tofill.addComponent(togo); RSFUtil.updateChildIDs(togo); return togo; }
protected static UISelect make(UIContainer tofill, String ID, String[] options) { UISelect togo = new UISelect(); togo.ID = ID; togo.optionlist = togo.optionnames = UIOutputMany.make(options); tofill.addComponent(togo); RSFUtil.updateChildIDs(togo); 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; }