|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.interceptor.AroundInterceptor
com.opensymphony.webwork.interceptor.BooleanTweaker
public class BooleanTweaker
Interceptor tweaking boolean parameters. parameters with names starting by PREFIX will be stripped of it, and if no value is available under stripped name explicitely set to false. This helps to overcome problem with boolean checkboxes ( unchecked value is not sent by browser ) To be used before ParametersInterceptor. No known extension points.
.... .... .... ....
Field Summary | |
---|---|
static String |
FALSE
|
static String |
PREFIX
|
Fields inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor |
---|
log |
Constructor Summary | |
---|---|
BooleanTweaker()
|
Method Summary | |
---|---|
protected void |
after(ActionInvocation arg0,
String arg1)
Do nothing. |
protected void |
before(ActionInvocation ai)
Scan through the paramaters and find those with starts with getPrefix() and set
their corresponding parameter with value from getBooleanValue() . |
String |
getBooleanValue()
Get the boolean value to set. |
String |
getPrefix()
Get the prefix. |
void |
setBooleanValue(String booleanValue)
Set the boolean value. |
void |
setPrefix(String prefix)
Set the prefix. |
Methods inherited from class com.opensymphony.xwork.interceptor.AroundInterceptor |
---|
destroy, init, intercept |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PREFIX
public static final String FALSE
Constructor Detail |
---|
public BooleanTweaker()
Method Detail |
---|
public void setBooleanValue(String booleanValue)
booleanValue
- public String getBooleanValue()
public void setPrefix(String prefix)
prefix
- public String getPrefix()
protected void after(ActionInvocation arg0, String arg1) throws Exception
after
in class AroundInterceptor
arg0
- arg1
-
Exception
protected void before(ActionInvocation ai) throws Exception
getPrefix()
and set
their corresponding parameter with value from getBooleanValue()
.
Eg, parameter
before
in class AroundInterceptor
ai
-
Exception
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |