Hi,
I'm having a problem updating the value of a inputText component from
the value change listener of a selectOneChoice component.  I have the
following in my jspx page:

  <f:view>
    <tr:document title="Index">
      <trh:body>
        <tr:form>
          <tr:selectOneChoice id="memberSelect" value="#{myBacking.selectValue}"
            valueChangeListener="#{myBacking.changeListener}"
            autoSubmit="true" >
            <tr:selectItem label="Item 1" value="1"/>
            <tr:selectItem label="Item 2" value="2"/>
            <tr:selectItem label="Item 3" value="3"/>
          </tr:selectOneChoice>
          <tr:inputText value="#{myBacking.line2}" label="Line 2:"
            partialTriggers="memberSelect" id="line2"/>

        </tr:form>
      </trh:body>
    </tr:document>
  </f:view>

My value change listener in my backing bean is
  public void changeListener(ValueChangeEvent evt) {
    setLine2("XXXX");  }
}
When I run the page, if I only change the value of selectOneChoice,
then "XXXX" gets populated in the input text box as I expected.
However, if I type something in the inputText component and then
change the value of the selectOneChoice, the value that I typed
remains in the input text box. If I then change the value of the
select box again, then "XXXX" gets populated in the text box. I'm
wondering why it takes a second time through the value Change Listener
for the input text component to be updated with the value that is set
in the listener method.

Thanks for any help or suggestions in advance,

Richard

Reply via email to