/** * Add a boolean input control which may be toggled by the user. A checkbox * may have several fields which share the same name and each of those * fields may be toggled independently. This is distinct from a radio button * where only one field 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. * @param rend * (May be null) a rendering hint used to override the default * display of the element. * @return a new checkbox field */ public CheckBox addCheckBox(String name, String rend) throws WingException { CheckBox checkbox = new CheckBox(context, name, rend); contents.add(checkbox); return checkbox; }
/** * Add a boolean input control which may be toggled by the user. A checkbox * may have several fields which share the same name and each of those * fields may be toggled independently. This is distinct from a radio button * where only one field 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. * @param rend * (May be null) a rendering hint used to override the default * display of the element. * @return a new checkbox field */ public CheckBox addCheckBox(String name, String rend) throws WingException { CheckBox checkbox = new CheckBox(context, name, rend); fields.add(checkbox); return checkbox; }