/** * Add a boolean input control which may be toggled by the user. Multiple * radio button fields may share the same name. When this occurs only one * field may be selected to be true. This is distinct from a checkbox where * multiple fields may be toggled. * * @param name * (Required) a non-unique local identifier used to differentiate * the element from its siblings within an interactive division. * This is the name of the field use when data is submitted back * to the server. * * @return a new radio field */ public Radio addRadio(String name) throws WingException { return addRadio(name, null); }
Radio oaiSetSettingRadio = oaiSetComp.addRadio("oai-set-setting"); oaiSetSettingRadio.addOption("all".equals(oaiSetIdValue) || oaiSetIdValue == null, "all", "All sets"); oaiSetSettingRadio.addOption(!"all".equals(oaiSetIdValue) && oaiSetIdValue != null, "specific", "Specific sets");