incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Koci <Martin.K...@aura.cz>
Subject setLocalValueSet never called for true???
Date Wed, 31 May 2006 22:18:21 GMT
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));
      }
    }


Mime
View raw message