Hi Mark,

Good question... and a resonable thing to want to do...

Unfortunately I don't believe it's possible at the moment.

It might be good to introduce a way to do this mapping...something like:

<mapping>
   <use-handler name="com.agedwards.core.xml.DateFieldHandler"
type="date"/>
</mapping>

Or even in the castor.properties to allow default introspection to use
the handler also.

I've added this to my list of things to do, but I'm not sure how long it
might take to implement or when I'll have a chance to get to it. If this
is something you'd be interested in helping us implement, then please
feel free to do so.

The best thing to do for now is to open an enhancement request at
http://bugzilla.exolab.org for tracking purposes.

Thanks,

--Keith

> "Volkmann, Mark" wrote:
> 
> I've written my own DateFieldHandler that extends
> GeneralizedFieldHandler.  It works great when I associate it with a
> field as follows.
> 
> <mapping>
>     <description>Description of the mapping</description>
>     <class name="com.agedwards.model.Person">
>         <field name="birthday" type="date"
>             handler="com.agedwards.core.xml.DateFieldHandler">
>             <bind-xml name="dateOfBirth" node="element"/>
>         </field>
>     </class>
> </mapping>
> 
> However, what I really want to do is associate it with ALL fields of
> type java.util.Date.  In my real application there are too many such
> fields to do this for each one and I don't want to have to update my
> mapping file every time a new object field of type java.util.Date is
> added.
> 
> Is there a way I can associate a handler with a class instead of a
> field?
> 
> ***********************************************************************************
> WARNING: All e-mail sent to and from this address will be received or
> otherwise recorded by the A.G. Edwards corporate e-mail system and is
> subject to archival, monitoring or review by, and/or disclosure to,
> someone other than the recipient.
> ************************************************************************************

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

Reply via email to