commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [digester] i'd like to contribute - here's my new feature idea
Date Thu, 12 Dec 2002 19:31:20 GMT
hi sean

(if i've understood you right) then i think that this functionality exists 
already (or very nearly does).

take a look at the ObjectCreateRule(String classname, String attributeName)
. this will create an object who class name is given in an attribute of 
the xml. at the moment, you have to specify a class name (which is used as 
a default class to construct if the attribute isn't present) but it should 
be very easy to create a patch which eases this restriction.

but don't let that put you off if you think you have a better solution.

if you still want to get involved, make sure you've browsed and read the 
relevant pages on the jakarta website. here's a brief list of urls (not 

all contributions are welcome :)

- robert

On Thursday, December 12, 2002, at 05:15 PM, Sean Schofield wrote:

> Greetings,
> I have been using the great software developed by the jakarta team for 
> some time now.  I have found it very useful and I would like to 
> contribute something.  I'd like to start with the commons digester and I 
> have a specific idea.  Let me know if people would like to see this 
> implemented.  I think sending an email to this list is the right way to 
> get started but I appologize in advance if its not.
> Here is a generic example of the problem I was trying to solve with 
> digester and an explanation of how the current code did not completely 
> meet my needs (although I just got started with digester so I may have 
> overlooked something).  The example is building a GUI client for a 
> program where the components used to build the client are dynamically 
> configured through an XML file.  For simplicity I will not address the 
> possibility of components containing other components.  Here is the xml:
> <client>
>     <component classname="ComponentA"/>
>     <component classname="ComponentB">
>     	<property name="SomeProperty" value="some value"/>
>     </component>
> </client>
> Now I'd like the digester to create a Client object when it encounters 
> the <client> tag.  OK so far, I'll just use the standard ObjectCreateRule.
>   The problem then becomes that I know I will be encountering the "client/
> component" pattern but I don't know what types of objects they are until 
> runtime.  I'd like to be able to specify the classname somehow instead of 
> hardcoding it in the rule setup (or dynamically creating the rule).  Also,
>  each component may have zero or more properties to set but I don't know 
> the name of the properties in advance.
> I have a specific solution in mind if the team is interested in hearing 
> it (actually a few possible solutions).  If its determined that we don't 
> want to do it there will be no hard feelings.  I definitely want to 
> contribute something and all of the mailling lists just say go ahead and 
> jump in.  If this is a "no go" then I'd be happy to help in another 
> capacity.
> TIA for your feedback on this and keep up the good work!
> - sean
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.
> org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
> org>

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

View raw message