Hi,

Currently in the XMLFieldDescriptorImpl class the default field handler is
changed to the DateFieldHandler
class for date type fields. 

    public XMLFieldDescriptorImpl( FieldDescriptor fieldDesc, String
xmlName, NodeType nodeType )
    {
        :
        :
        //-- check for instances of java.util.Date
        if (java.util.Date.class.isAssignableFrom(_fieldType)) {
            if (!(_handler instanceof DateFieldHandler)) {
                _handler = new DateFieldHandler(_handler);
            }
        }
      :
      :
   }

I want to know if this can be generalized to any field type through some
mechanism. It would be ideal
if the user can specify the handler class for the field in the mapping file.
The user specified handler
class should implement the org.exolab.castor.mapping.FieldHandler interface.

Example -

        <field name="currency" type = "a.b.Currency"
handler="a.b.CurrencyLookup".....>
                :
        </field>

Are there any plans to introduce such feature in Castor in the near future?
I can contribute to adding
this functionality in Castor. 

Thanks.

Subramanian

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to