The difference between the two is that the way the code
used to be, updateModel() would get called even when
there was no ValueChangeEvent, which was undesirable.
Now, updateModel() will only happen when the value
actually changes. That should be a good thing; is
this causing problems in your code? Do you not see
updateModel() executing properly when the value has
actually changed?
-- Adam
On 5/31/06, Martin Koci <[EMAIL PROTECTED]> wrote:
Hello,
I have strange problems with latest build from svn - update model phase
on components is called but canceled after first steps because
isLocalValueSet() return always false!
public void updateModel(FacesContext context)
{
if (context == null)
throw new NullPointerException();
if (!isValid() || !isLocalValueSet()) <<-- always return false
return;
I found in UIXEditableValue:
// If our value is valid, store the new value, erase the
// "submitted" value, and emit a ValueChangeEvent if appropriate
if (isValid())
{
Object previous = getValue();
setSubmittedValue(null);
if (compareValues(previous, newValue))
{
setValue(newValue); <<<<<<< ------- setValue only if no
change?
queueEvent(new ValueChangeEvent(this, previous, newValue));
}
}
I think it should be:
// If our value is valid, store the new value, erase the
// "submitted" value, and emit a ValueChangeEvent if appropriate
if (isValid())
{
Object previous = getValue();
setSubmittedValue(null);
setValue(newValue);
if (compareValues(previous, newValue))
{
queueEvent(new ValueChangeEvent(this, previous, newValue));
}
}