commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: Digester doubts...
Date Sun, 12 Dec 2004 11:06:57 GMT
hi Leonardo

the standard rules which ship with digester includes FactoryCreateRule. 
this only supplies the element attributes to the factory (and not the 
path). so, if you really need the path, the easiest way to proceed is 
to create a new custom rule implementation. it should be pretty 
straightforward. take a look at FactoryCreateRule as an example.

- robert

On 10 Dec 2004, at 20:16, Leonardo Larraquy wrote:

> Hi experts:
>     I've got a doubt about digester, it's simple, I need to provide it 
> a Factory to search for my objects.
>     Here's a part of my XML.
> <Puma_Producto name="SourceKey_1" Datetime="Datetime_1" 
> Action="Action_1">
> <Datos CODE="CODIGO_1" DESCR="DESCRIPCION_1"></Datos>
>
> Here's what I'm doing now.
>
> digester.addObjectCreate("Puma_Producto/Datos", 
> "com.jkt.puma.articulos.bm.Articulo");
>
> I tell him that when he finds "Puma_Producto/Datos", to give me a 
> instance of Articulo.
>
> Now I what to tell him to give me an instace of Articulo, but telling 
> a Factory to do so with the value "Puma_Producto/Datos/CODE".
>
> Is that possible??
>
> Thanks in advance.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message