Title: Message
 
-----Original Message-----
From: John Patterson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 9:42 AM
To: Webwork
Subject: [OS-webwork] Type conversion

What is happening with the type conversion functionality?  I need to be able to override the conversion both to and from string easily.  xwork-conversion.properties only allows me to specify one way. 
 
If you specify a converter for the one direction and it is trying to convert from your type TO a String, it will also try to use that same converter (so make them bidirectional) 
 
Is there any plans to allow you to configure a converter seperatly for each property?  For example, I have several dates which appear on a page in different formats.  It would be great to be able to specify in xwork.xml the format to be used for each property.  Or would this be best handled in a tag lib (to presentation specific)?   
 
This can be done now. You would have a MyAction-conversion.properties which specifies the conversions for this specific class (by field name). I'm not sure if Pat has fully documented this? 
 
Maybe if the PropertyTag had a format attribute which was somehow passed to the TypeConverter...
 
<ww:property value="startDate" format="dd MMM yyyy"/>
 
...or something like that.
 
John. 
 
Also on the type conversion front... I checked in yesterday a change to make type conversion problems add field errors to your Action... let me know if it's working for you.
 
Jason

Reply via email to