commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Aust" <christ...@wilde-welt.de>
Subject [betwixt] Using options while mapping a Java type
Date Tue, 24 May 2005 11:30:21 GMT
Hi,

I'd like to customize the way betwixt maps Java types at runtime. See this:

Class file (shortened for readability):
==============================================================
class MyBean {
public Object getStandardProperty() {}
public Object getOtherProperty() {}
}
==============================================================

.betwixt file:
==============================================================
<?xml version="1.0" encoding="UTF-8" ?>
<info>
<element name="mybean">
	<element name="attachedObject" property="standardProperty">
		<option>
			<name>ifPreview</name>
			<value>otherProperty</value>
		</option>
	</element>
	<addDefaults/>
</element>
</info>
==============================================================

I'd like to implement some (pluggable?) strategy that checks if that option "ifPreview"
is set and in that case returns the value of getOtherProperty() instead of
getStandardProperty() as the element named "mybean.attachedObject".

I've tried a number of strategies, but couldn't find the right one. Could somebody
please assist me in the right direction? Regards,

-  Christian

-- 

Christian Aust
mailto:christian@wilde-welt.de
icq: 84500990 - Yahoo!: datenimperator - MSN: datenimperator
PGP: A94E 0181 664D 27E3 F05A  A751 6A7E 90D1 A0A3 DEC7


---------------------------------------------------------------------
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