Looking at my crystal ball i can imagine that you are not pushing anything in the Digester stack before calling parse().
Nation, Carey wrote:
Hi, 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 happening)?
Thanks, Carey Nation
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------------------------- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
