/** * Constructs a single selection control, with labels distinct from the * submitting values. */ public static UISelect make(UIContainer tofill, String ID, String[] options, String[] labels, String valuebinding, String initvalue) { UISelect togo = make(tofill, ID, options, valuebinding, initvalue); if (labels != null) { togo.optionnames = UIOutputMany.make(labels); } return togo; }
/** 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; }
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; }
/** * Constructs a multiple selection control, with distinct submitted values and * rendered labels. */ public static UISelect makeMultiple(UIContainer tofill, String ID, String[] options, String[] labels, String valuebinding, String[] initvalue) { UISelect togo = make(tofill, ID, options); UIInputMany selection = UIInputMany.make(valuebinding); if (initvalue != null) { selection.setValue(initvalue); } if (labels != null) { togo.optionnames = UIOutputMany.make(labels); } togo.selection = selection; return togo; }
null, ttb + "month", transit == null ? null : transit.month); monthselect.optionnames = UIOutputMany.make(monthbeanname + ".indexes", monthbeanname +".names");
null, ttb + "month", transit == null ? null : transit.month); monthselect.optionnames = UIOutputMany.make(monthbeanname + ".indexes", monthbeanname +".names");