T
Thomas
Hello!
I need some help with struts 2.
I've an action with:
...
private Boolean bool = null;
...
execute(){
....
}
and on a jsp a form with:
<select name="bool"><option value="">all</option><option
value="true">true</option><option value="false">false</option></
select>
in the action bool is everytime true or false... never null! I need
bool=null if the option "all" was set in my form.
In struts 1 i had to register a new Converter like this:
BeanUtilsBean.getInstance().getConvertUtils().register(new
BooleanConverter(null),Boolean.class);
Also for String etc. if needed. But what is to do if working with
struts 2???
Greetings
Thomas
I need some help with struts 2.
I've an action with:
...
private Boolean bool = null;
...
execute(){
....
}
and on a jsp a form with:
<select name="bool"><option value="">all</option><option
value="true">true</option><option value="false">false</option></
select>
in the action bool is everytime true or false... never null! I need
bool=null if the option "all" was set in my form.
In struts 1 i had to register a new Converter like this:
BeanUtilsBean.getInstance().getConvertUtils().register(new
BooleanConverter(null),Boolean.class);
Also for String etc. if needed. But what is to do if working with
struts 2???
Greetings
Thomas