You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Craig Tataryn <cr...@hotmail.com> on 2003/12/08 20:53:14 UTC

addBeanPropertySetter help

Hi, I have an XML file that looks like this:

<data-mappings>
	<dispatchers>
		<!-- dispatcher section must appear before data-mappings -->
		<dispatcher name="Sybase Stored Procedure" class="StoredProcDataDispatch">
			<db>Data</db>
			<server>192.168.200.1</server>
			<port>2638</port>
			<dbfile>test</dbfile>
			<uid>dba</uid>
			<pwd>pwd</pwd>
		</dispatcher>
	</dispatchers>

	<data-mapping class="Customer" dispatcher="Sybase Stored Procedure"/>

</data-mappings>

Basically the tags below data-mappings/dispatchers/dispatcher are going to 
be adhoc (they represent properties on the StoredProcDataDispatch instance 
which will be set).  I tried setting these properties by the following code:

digester.addObjectCreate("data-mappings/dispatchers/dispatcher","class",java.lang.Object.class);
digester.addBeanPropertySetter("data-mappings/dispatchers/dispatcher/*");

But the properties on the object are never set :(  Is there a rule I can use 
where I can provide a pattern for a root node (i.e. 
data-mappings/dispatchers/dispatcher) and have all the child nodes below it 
act as property setters much like the addSetProperties rule works for 
attributes.

Thanks,

Craig.

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=dept/features&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca


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