/** * Constructs a single selection control, where the submitted values are * identical with the rendered labels */ public static UISelect make(UIContainer tofill, String ID, String[] options, String valuebinding, String initvalue) { UISelect togo = make(tofill, ID, options); UIInput selection = UIInput.make(valuebinding); if (initvalue != null) { selection.setValue(initvalue); } togo.selection = selection; return togo; }
/** * @see #make(String) * @param valuebinding An EL reference to which the bound value is to be associated * @param initvalue An initial value for the control, to take priority over any bound * value during the render cycle. * @return The constructed UIInput control. */ public static UIInput make(String valuebinding, String initvalue) { UIInput togo = new UIInput(); togo.valuebinding = ELReference.make(valuebinding); if (initvalue != null) { togo.setValue(initvalue); } return togo; } }
/** * Construct a new UIInput component with the specified container as parent. * * @param parent Parent container to which the component is to be added. * @param ID (RSF) ID of this component. * @param binding An EL expression to be used as the value binding for the * contained String value. May be <code>null</code>. * @param initvalue An initial value for the bound value. May be left * <code>null</code>. If neither this field nor * <code>binding</code> is set. the value present in the template * will be used. * @return The constructed UIInput component. */ public static UIInput make(UIContainer parent, String ID, String binding, String initvalue) { UIInput togo = new UIInput(); togo.valuebinding = ELReference.make(binding); if (initvalue != null) { togo.setValue(initvalue); } togo.ID = ID; parent.addComponent(togo); return togo; }