RE:[chain] giving constructor parameters in catalog.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

RE:[chain] giving constructor parameters in catalog.xml

Michael Rasmussen-2
>Is it possible to provide parameters to the constructors for different
>commands in catalog.xml ??

  Maybe I am misunderstanding your request here.

  The way I have always used commands is with a no arg constructor.
All information you want to give to the command is through getters and
setters.  Those are set by digester when it reads an attribute in your
xml element.

so you do something like <db-connection-command
url=""/> and digester creates a new
DBConnectionCommand object and calls the setUrl on it.

I personally don't see a need to set something through a constructor
argument because your command is built before you call it anyway.  Is
there something you need to set that MUST be done during class

Hope the answer isn't too late to be of help.


To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]