Hi Ted,
This can happen when the dropdown is not static but populated from a
data source. If the previously selected item is not in the dropdown on
a redraw, this can happen.
It doesn't really hurt anything. It just lets you know. It evidently
happens very early in the page rendering cycle because I've had trouble
getting rid of it too.
If you create your own options there may also be a default options left
defined in the page that is unused. That can also create the mismatch.
Rick
Ted Byers wrote:
> In the output from Apache Tomcat 6.0.16, I see the following:
>
> "com.sun.webui.jsf.component.DropDown::The current value of component
> form1:dropDown2 does not match any of the selections.
> "Did you forget to reset the value after changing the options? "
>
> Why would this happen? I NEVER change the options. I programmatically set
> the selected value in only one place, as follows:
>
> com.sun.webui.jsf.model.Option[] tpOptions =
> (com.sun.webui.jsf.model.Option[])getDropDown2().getItems();
> getDropDown2().setSelected(tpOptions[0]);
>
> This happens in the change event handler for the other dropdown control.
> The idea is that dropdown2 should default to the first option it holds
> whenever a new item is selected using dropdown1.
>
> Or is it the case that getItems+setSelected doesn't work the way I would
> intuitively expect?
>
> Thanks
>
> Ted
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe@...
For additional commands, e-mail:
users-help@...