类 CheckboxTag

  • 所有已实现的接口:
    Serializable, DynamicAttributes, IterationTag, JspTag, Tag, TryCatchFinally, EditorAwareTag

    public class CheckboxTag
    extends AbstractSingleCheckedElementTag
    Databinding-aware JSP tag for rendering an HTML 'input' element with a 'type' of 'checkbox'.

    May be used in one of three different approaches depending on the type of the bound value.

    Approach One

    When the bound value is of type Boolean then the 'input(checkbox)' is marked as 'checked' if the bound value is true. The 'value' attribute corresponds to the resolved value of the value property.

    Approach Two

    When the bound value is of type Collection then the 'input(checkbox)' is marked as 'checked' if the configured value is present in the bound Collection.

    Approach Three

    For any other bound value type, the 'input(checkbox)' is marked as 'checked' if the configured value is equal to the bound value.
    从以下版本开始:
    2.0
    作者:
    Rob Harrop, Juergen Hoeller
    另请参阅:
    序列化表格