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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top