Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.interceptor
Class CheckboxInterceptor

    java.lang.Object
      org.apache.struts2.interceptor.CheckboxInterceptor

All Implemented Interfaces:
  Interceptor, Serializable

    public class CheckboxInterceptor

extends Object
implements Interceptor

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

Field Summary
`private static long` | `serialVersionUID` Auto-generated serialization id
`private String` | `uncheckedValue`

Constructor Summary
`CheckboxInterceptor()`

Method Summary
`void` | `destroy()` Called to let an interceptor clean up any resources it has allocated.
`void` | `init()` Called after an interceptor is created, but before any requests are processed using `intercept` , giving the Interceptor a chance to initialize any needed resources.
`String` | `intercept(ActionInvocation ai)` Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the request by the `ActionInvocation` or to short-circuit the processing and just return a String return code.
`void` | `setUncheckedValue(String uncheckedValue)` Overrides the default value for an unchecked checkbox

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

  Auto-generated serialization id

  See Also:
    Constant Field Values

### uncheckedValue

    private String uncheckedValue

Constructor Detail

### CheckboxInterceptor

    public CheckboxInterceptor()

Method Detail

### destroy

    public void destroy()

  Description copied from interface: `Interceptor`
  Called to let an interceptor clean up any resources it has allocated.

  Specified by:
    `destroy` in interface `Interceptor`

### init

    public void init()

  Description copied from interface: `Interceptor`
  Called after an interceptor is created, but before any requests are processed using `intercept` , giving the Interceptor a chance to initialize any needed resources.

  Specified by:
    `init` in interface `Interceptor`

### intercept

    public String intercept(ActionInvocation ai)
                     throws Exception

  Description copied from interface: `Interceptor`
  Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the request by the `ActionInvocation` or to short-circuit the processing and just return a String return code.

  Specified by:
    `intercept` in interface `Interceptor`
  Returns:
    the return code, either returned from `ActionInvocation.invoke()`, or from the interceptor itself.
  Throws:
    `Exception` - any system-level error, as defined in `Action.execute()`.

### setUncheckedValue

    public void setUncheckedValue(String uncheckedValue)

  Overrides the default value for an unchecked checkbox

  Parameters:
    `uncheckedValue` - The uncheckedValue to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.