I've added some code in XWorkConverter that retrieves Converters by
inheritance (super-class or interface).
For instance :
in xwork-conversion.properties, you add the following line :
        java.util.Date=com.uniclick.xwork.converters.DateConverter

And every class that is an instance of java.util.Date (timestamp,
java.sql.Date, ...) will be converted using the
com.uniclick.xwork.converters.DateConverter converter.

You could do so to convert every model class, by adding a single line (your
model interface) in the xwork-conversion.properties.

Hope it can help.
Richard.

-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] la part de
Mark Woon
Envoyé : lundi 1 mars 2004 12:31
À : [EMAIL PROTECTED]
Objet : [OS-webwork] Type conversion



I'm trying to figure out how type conversions work in XWork right now
and need some guidance.  So far, it looks like all the work is done by
XWorkConverter, but I can't figure out how it actually gets called.  As
far as I can tell, there's some OGNL magic that triggers a call to
convertValue, but how?  When?

One of the reasons I'm doing this is that I'd like to extend
XWorkConverter so that when I'm using ModelDriven Actions it uses my
class's interface rather than the class itself.

Can anyone point me in the right direction?

BTW, Jason, have you considered adding a buildTypeConverter ObjectFactory?


Thanks,
-Mark


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to