<div class="gmail_quote">On Wed, Sep 9, 2009 at 12:35 PM, Kito Mann <span dir="ltr"><<a href="mailto:kito.mann@virtua.com">kito.mann@virtua.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div class="im">On Wed, Sep 9, 2009 at 12:33 AM, Lincoln Baxter, III <span dir="ltr"><<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
One more issue I'd like to bring up: it appears that when using <f:valueChangeListener action="..." /> the value of the object provided has not yet been updated in the model, hence, the value is the old value, not the new value.<br>
<br>
When using <f:actionListener> on the button submitting the values, the new value is populated into the model instead... which is the behavior I would expect.<br>
<br>
Pardon the probably obvious question...<br>
<br>
Is there an contract with valueChangeListeners that states they fire before model updates? I see in the spec that it fires: "when a new local value has been created, and has passed all validations," but nothing about if the model has been updated or not.<br>
</div></blockquote></div><div><br>They're fired after the Process Validations phase (or Apply Request Values if immediate=true), which always occurs before the Update Model phase. The idea is that the input must be in a valid state before the model is updated.<br>
</div></div></blockquote><div><br>And that the value change listener is notified of the intent to change the model value, hence giving it a chance to block the update (or at least that becomes a possible course of action).<br>
<br>-Dan</div></div><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br>
<a href="http://in.relation.to/Bloggers/Dan">http://in.relation.to/Bloggers/Dan</a><br>