incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: setLocalValueSet never called for true???
Date Thu, 01 Jun 2006 04:39:03 GMT
Ah, good catch! (And nice debugging.)  Could you file this?

Thanks,
Adam


On 5/31/06, Martin Koci <Martin.Koci@aura.cz> wrote:
> My instance of
> org.apache.myfaces.adf.component.core.input.CoreSelectOrderShuttle
> incorrectly uses instance of
> org.apache.myfaces.adfinternal.uinode.UINodeFacesBean, but this type
> doesn't set property "localeValueSet" automatically as following
> facesBeans do:
> org.apache.myfaces.adf.component.UIXEditableValueBean
> org.apache.myfaces.adfinternal.bean.UIXEditableFacesBeanImpl
> org.apache.myfaces.adfinternal.uinode.EditableFacesBean.
>
> This is probably that problem.
>
> Martin Koci píše v Čt 01. 06. 2006 v 00:36 +0200:
> > This changed code works ok :
> >       setSubmittedValue(null);
> >       if (compareValues(previous, newValue))
> >       {
> >         setValue(newValue);
> >         setLocalValueSet(true); // explicit calling setLocalValueSet
> >         queueEvent(new ValueChangeEvent(this, previous, newValue));
> >       }
> >
> >
> >
> > Martin Koci píše v Čt 01. 06. 2006 v 00:29 +0200:
> > > I have problems with selectOrderShuttle - it was working with build
> > > donated with you and Oracle to apache (packages oracle.*) but now it
> > > stops.
> > >
> > > > 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?
> > >
> > > Yes, I select more items or reorder them , values are correctly
> > > submitted and validated but update model phase doesn't call
> > >
> > >       Object localValue = getLocalValue();
> > >       binding.setValue(context, localValue);
> > >
> > > because isLocalValueSet returns false;
> > >
> > >
> > >
> > > >
> > > > -- Adam
> > > >
> > > >
> > > > On 5/31/06, Martin Koci <Martin.Koci@aura.cz> 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));
> > > > >       }
> > > > >     }
> > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
>
>
Mime
View raw message