struts 2 - help

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,733
Latest member
LonaMonzon

Latest Threads

Top