myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Kahlau" <mkah...@web.de>
Subject AW: Update Model Values Phase question
Date Sat, 17 Dec 2005 17:03:11 GMT
Hi Matthias,


many thanks. I didn't know that the public JSF API is so informative... the
source code anyway...



Regards,

Matthias

> -----Ursprüngliche Nachricht-----
> Von: users-return-13874-mkahlau=web.de@myfaces.apache.org
> [mailto:users-return-13874-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> von Matthias Wessendorf
> Gesendet: Samstag, 17. Dezember 2005 17:19
> An: MyFaces Discussion
> Betreff: Re: Update Model Values Phase question
>
>
> the value is set to null and the set local value state to false
>
> this is from UIInput (implemented by MyFaces)
> <snip>
>     public void updateModel(FacesContext context)
>     {
>         if (!isValid()) return;
>         if (!isLocalValueSet()) return;
>         ValueBinding vb = getValueBinding("value");
>         if (vb == null) return;
>         try
>         {
>             vb.setValue(context, getLocalValue());
>             setValue(null);
>             setLocalValueSet(false);
>         }
>         catch (RuntimeException e)
>         {
>         	//Object[] args = {getId()};
>             context.getExternalContext().log(e.getMessage(), e);
>             _MessageUtils.addErrorMessage(context,
> this,CONVERSION_MESSAGE_ID,new Object[]{getId()});
>             setValid(false);
>         }
>     }
> </snip>
>
> see the complete java file here:
> http://svn.apache.org/viewcvs.cgi/myfaces/api/trunk/src/java/javax
> /faces/component/UIInput.java?rev=356384&view=markup
>
>
> BTW. the algorithm for the updateModel method is defined inside
> the jsf spec
> for more details look at the public API
> (http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/fa
> ces/component/UIInput.html#updateModel(javax.faces.context.FacesContext))
>
>
> HTH,
> Matthias
>
> On 12/17/05, Matthias Kahlau <mkahlau@web.de> wrote:
> > Hi!
> >
> >
> > If the Backing-Bean property value of a component can be
> successfully set
> > with the local value of the component, is the local value than
> set to NULL?
> >
> >
> >
> > Regards,
> >
> > Matthias
> >
> >
>
>
> --
> Matthias Wessendorf
> Zülpicher Wall 12, 239
> 50674 Köln
> http://www.wessendorf.net
> mwessendorf-at-gmail-dot-com


Mime
View raw message