/** * Constructs a multiple selection control, where the submitted values are * identical with the rendered labels. Named differently to allow overload * where the final parameter is null. */ public static UISelect makeMultiple(UIContainer tofill, String ID, String[] options, String valuebinding, String[] initvalue) { UISelect togo = make(tofill, ID, options); UIInputMany selection = UIInputMany.make(valuebinding); if (initvalue != null) { selection.setValue(initvalue); } togo.selection = selection; return togo; }
/** * A "bare" constructor suitable for the selection member of a multiple * selection control (UIInput); */ public static UIInputMany make(String valuebinding) { UIInputMany togo = new UIInputMany(); togo.valuebinding = new ELReference(valuebinding); return togo; }
togo.addComponent(toevolve); String[] value = toevolve.getValue(); value = (String[]) rbg.getBean(toevolve.valuebinding.value); toevolve.setValue(value); UIBranchContainer row = UIBranchContainer.make(core, "dynamic-list-input-row:", Integer.toString(i)); UIBasicListMember.makeBasic(row, "input", toevolve.getFullID(), i); UIOutput.make(row, "remove", removelabel.getValue(), removelabel.valuebinding == null ? null
/** A full constructor, specifying a bound String array with an optional * initial value. Note that there is no direct renderer for such a component * in HTML. */ public static UIInputMany make(UIContainer parent, String ID, String binding, String[] initvalue) { UIInputMany togo = new UIInputMany(); togo.valuebinding = ELReference.make(binding); if (initvalue != null) { togo.setValue(initvalue); } togo.ID = ID; parent.addComponent(togo); return togo; }
/** @see #make(UIContainer, String, String, String[]) */ public static UIInputMany make(UIContainer parent, String ID, String binding) { return make(parent, ID, binding, null); } }
togo.addComponent(toevolve); String[] value = toevolve.getValue(); value = (String[]) rbg.getBean(toevolve.valuebinding.value); toevolve.setValue(value); UIBranchContainer row = UIBranchContainer.make(core, "dynamic-list-input-row:", Integer.toString(i)); UIBasicListMember.makeBasic(row, "input", toevolve.getFullID(), i); UIOutput.make(row, "remove", removelabel.getValue(), removelabel.valuebinding == null ? null
/** * 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; }