You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Elam Daly <el...@gmail.com> on 2006/01/25 20:48:27 UTC

Component Binding and ValueChangeListener

Hi all,

I have something like this:

<h:inputText binding="#{MyBean.myBind}" />

<h:selectOneListBox valueChangeListener="#{MyBean.doThis}"
onclick="submit()">
.
</h:selectOneListBox>

and in my doThis() method I update the <h:inputText> component manually via
a HtmlInputText object.

The problem is the getMyBind() method is never called, which would display
the value of the bound component.

I am aware of the lifecycle problems that a valueChangeEvent creates, in
that if you change a component value, it will be overridden later in the
cycle by setter method bindings.  But since I am using a component binding,
I thought I could avoid this.  I don't even have a setter method for my
inputText.  Only a getter that returns an HtmlInputText object.  But the
getter method is never called.

Any insight in appreciated,
-Elam