Hi,
  I have tried your suggestion, but my custom field handler will get the
object that contains the field. There is no way to tell which field I want
to handle.
ex,
my mapping file
-------------------
<class name="ZoneMastBiz">
<field name="User27" type="java.sql.Timestamp"
handler="TimestampFieldHandler">
  <bind-xml name="User27" node="element"/>
</field>
-------------------

In my field handler, I got the object ZoneMastBiz, which I think it should
be "User27". So, I can "handler" it myself. Any suggestion?

my handler implement
----------------------
public class TimestampFieldHandler extends XMLFieldHandler
{
  ...

  public Object getValue(Object _obj) throws IllegalStateException
  {
    /* I got ZoneMastBiz here. How could I know it is called within the
field "User27" ? */
  }
  ...
}
-----Original Message-----
From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 5:49 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] CastorXML Timestamp issue


Hi Stan,

We can't integrate the patch the way it is since it doesn't fit with the
current code base and semantics of Castor. The best way to provide
marshalling and unmarshalling of such a class is to use the pluggable
FieldHandler API in Castor.
What you have to do is write a specific FieldHandler that will help the
marshalling framework to marshal/unmarshal a java.sql.TimeStamp. You can
take a look at org.exolab.castor.xml.handlers.DateFieldHandler as an
example.
Once your handler is ready you can specify it using the 'handler'
attribute of the <field> element in a mapping file.
Feel free also to send us the handler so that we can integrate it in the
next release.

Thanks,

Arnaud

-----Original Message-----
From: Tyree, Stan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 03, 2002 9:03 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] CastorXML Timestamp issue

Quan,
�
I saw this post and�didn't see your fix in the latest version of
castor.� Do you know if anyone�has plans of addressing the
problem/solution you had?
�
http://www.mail-archive.com/[email protected]/msg01422.html
�
Thanks,
�
Stan T.

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

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

Reply via email to