The
valueChangeListener gets invoked on the server while JSF is processing a
request. It is not invoked on the browser. If you want something to
happen on the browser, you need to do something like
">
A good
description of value change (and other life cycle) events is given in Chapter 7
of "Core JavaServer Faces"
-
Brendan
-----Original Message-----
From: Bryan Headley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 20, 2005 12:24 PM
To: MyFaces Discussion
Subject: Silly ValueChangeListener question
I have a simple page with an inputText and a valueChangeListener associated with that inputText.
My understanding is that upon the change of the inputText's value, that a call would be made to the listener I set up, either in the managed bean or in a listener class (the difference being whether I use an attribute in <h:inputText> or an <f:valueChangelistener> tag)
What appears to be happening is that the listener is not being called until a round-trip to the servlet occurs.
At least, some of the time. A colleague of mine tells me that he's had sporatic success with f:valueChangeListener.
This begs the question: am I supposed to also specify a '' in addition to the valueChangeListener tag to effect the automatic round-trip? Or am I experiencing a configuration issue where sometimes it works; sometimes it doesn't?
The fact that RI 1.1 seems to behave like myfaces in this matter doesn't infer as much as I had hoped. And thus far, no JSF book I read thus far said I needed to do onchange...
Can anyone explain this?
(Purely theoretical musing: I imagine a valueChangeListener would automatically add an 'onchange' during rendering; what if the user actually wanted to also specify an onchange that did something else -- like what, who knows -- maybe change the field's background color?)
Thanks in advance,
---
Bryan Headley
IT (WCM)
x08140

