item value must be the exact same type as the backing bean
getter/setter. A converter will not help!

In your example, itemValue is a string (use EL to use other types), so
therefore getYear/setYear must be a string as well for it to work.

This was broken in myfaces 1.1.4.

Please see the WIKI as it is documented there.

On 7/24/07, Marcus Beyer <[EMAIL PROTECTED]> wrote:

Greetings!

I am currently trying to switch from MyFaces 1.1.4 + Tomahawk 1.1.3
to MyFaces 1.1.5 + Tomahawk 1.1.6.

My Problem is this piece of code which used to work before the switch:

<t:selectOneMenu value="#
{projectSearchHandler.projectSearchValue.year}">
        <f:selectItem itemLabel="2007" itemValue="2007" />
        <f:selectItem itemLabel="2008" itemValue="2008" />
        <f:selectItem itemLabel="2009" itemValue="2009" />
</t:selectOneMenu>

with ProjectSearchValue.setYear() looking like this:

    public void setYear( java.lang.Integer year );

The setter is not called on form submit and I see no error message :(

The following questions are currently torturing me:

1. Is it possible to increase the verbosity so that I can see *that*
or even *why* the setter is not called?

2. Why did the code work and does not work anymore?

3. The setter is called if the setter parameter is a String. However
I really
don't want to change the parameter type. What can I do to make this
work?
Do I have to apply a converter or something? How? I tried but did not
succeed.

4. Does MyFaces + Tomahawk 1.2 make a difference in this regard?

Lots of thanks in advance!

Marcus


Reply via email to