org.apache.struts2.interceptor

## Class CheckboxInterceptor

- java.lang.Object
- - org.apache.struts2.interceptor.AbstractInterceptor
  - - com.opensymphony.xwork2.interceptor.AbstractInterceptor
    - - org.apache.struts2.interceptor.CheckboxInterceptor

- All Implemented Interfaces:
    Serializable, ConditionalInterceptor, Interceptor

      public class CheckboxInterceptor
      extends AbstractInterceptor

  Looks for a hidden identification field that specifies the original value of the checkbox. If the checkbox isn't submitted, insert it into the parameters as if it was with the value of 'false'.

  - setUncheckedValue - The default value of an unchecked box can be overridden by setting the 'uncheckedValue' property.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.opensymphony.xwork2.interceptor.ConditionalInterceptor

      `ConditionalInterceptor.LegacyAdapter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CheckboxInterceptor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `intercept(ActionInvocation ai)` Override to handle interception
    `void` | `setUncheckedValue(String uncheckedValue)` Overrides the default value for an unchecked checkbox

    - ### Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor

      `intercept, shouldIntercept, shouldIntercept`

    - ### Methods inherited from class org.apache.struts2.interceptor.AbstractInterceptor

      `destroy, init, setDisabled`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.opensymphony.xwork2.interceptor.ConditionalInterceptor

      `adapt`

    - ### Methods inherited from interface com.opensymphony.xwork2.interceptor.Interceptor

      `adapt`

    - ### Methods inherited from interface org.apache.struts2.interceptor.Interceptor

      `destroy, init`

- - ### Constructor Detail

    - #### CheckboxInterceptor

          public CheckboxInterceptor()

  - ### Method Detail

    - #### intercept

          public String intercept(ActionInvocation ai)
                           throws Exception

      Description copied from class: `AbstractInterceptor`
      Override to handle interception
      Specified by:
        `intercept` in class `AbstractInterceptor`
      Throws:
        `Exception`

    - #### setUncheckedValue

          public void setUncheckedValue(String uncheckedValue)

      Overrides the default value for an unchecked checkbox
      Parameters:
        `uncheckedValue` - The uncheckedValue to set

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.