commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Pérez Testa <>
Subject Re: Property not being set [Digester]
Date Thu, 09 Sep 2004 17:17:36 GMT
Could you bring us an idea of the Digester rules that you are using?
Looking at my crystal ball  i can imagine that you are not pushing 
anything in the Digester stack before calling parse().

Nation, Carey wrote:

>I have some xml that uses attributes.  One of the properties that maps to an attribute
is stored internally as a class of mine.  The setter
>accepts a String and instantiates one of my objects passing the string to the ctor and
stores the ref to that object in my bean.  Something like this:
>class Foo
>    public Foo( String s)...
>class Bean
>   private Foo f;
>   public void setFoo( String s)
>   {
>      f = new Foo( s);
>   }
><bean foo="12345" />
>When I get the object back, f is null.  Bean is actually nested inside another object,
if that matters.
>I know that setFoo is being called because I put a trace message in there.  I know further
than the "final" object that I'm getting back from digester is not the instance that is calling
setFoo, because I printed out the toString with the instance info on there.
>There are other fields in Bean that are base Java types (int, String), that are making
it to the final instance of the object.
>I thought maybe they were calling clone, but it doesn't appear that that is happening.
 So what is happening?  What do I have to do to get my fields copied (or whatever magic is
>Carey Nation
>To unsubscribe, e-mail:
>For additional commands, e-mail:
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información
de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda
prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita
de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar
inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention
and use of the named addressee(s). You are hereby notified that any dissemination, distribution
or copy of this communication is prohibited without the prior written consent of Indra. If
you have received this communication in error, please, notify the sender by reply e-mail

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message