Hey Cagatay -
On 6/2/11 2:34 PM, Cagatay Civici wrote:
> Does anyone know why converted local value is kept at state by calling
> setValue().
Isn't this done simply because we need some place to store the converted
value until the update model phase?
> Both mojarra and myfaces keeps the value at state and I cannot find
> anything regarding this in spec, please point me if I'm wrong.
Looks like this is covered in the javadoc for UIInput [1]:
> By default, during the Process Validators phase of the request
> processing lifecycle, the submitted value will be converted to a
> typesafe object, and, if validation succeeds, stored as a local value
> using setValue().
I agree with you that the current state of affairs is rather
confusing/difficult, so definitely open to doing something here. One
possible way to go is to expose a listener along the lines of Trindiad's
tr:resetActionListener [2].
Andy
[1]
http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/UIInput.html
[2]
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_resetActionListener.html