Hi,

For the issue in the previous mail, I have solved the dublication problem using get-method attribute of the <field> tag.

But now after unmarshalling process for an xml file which contains a date data, when I try to marshal it again, the order of changes  and date tag goes to top of the xml file.

How can i prevent this behavior? Do we have any setting  in the mapping file that make the order unchanged?

 

Xml before unmarshalling:

<order>

<item>.....</item>

<orderdate>...</orderdate>

</order>

 

Xml after marshalling:

<order>

<orderdate>...</orderdate> // date tag goes to top of the containing tag after marshalling..

<item>.....</item>

</order>

 

 

 

 


From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 19, 2005 3:15 PM
To: [email protected]
Subject: Re: [castor-user] DateFieldHandler usage!

 

Guteg Tag Mesut


It Looks like you found a genuine bug

Please enter the bug into Castor bugzilla

http://bugzilla.exolab.org/ AND

notify the last person who touched that class

[EMAIL PROTECTED] OR
[EMAIL PROTECTED]

Good work!
Martin-

----- Original Message -----

From: mesut çelik

Sent: Tuesday, July 19, 2005 7:47 AM

Subject: RE: [castor-user] DateFieldHandler usage!

 

Hi martin,

I have also implemented same kind of fieldhandler.

But my problem is that Castor dublicates the date tag within the xml data.

 

Here is the mapping definition of the fieldhandler.

            <field name="_currentTime" type="date" handler="*.DateOnlyDateHandler">

                  <bind-xml name="CurrentTime" node="element" />  

            </field>

With prefixed “_”, castor complain saying “no get_currenttime method”. I use “_” character because castor generated objects have field names with this prefix. If i remove, castor unintentaionally dublicates current time tag....

 

do you have any other recommondation?

 

Thanks in advance

Mesut

 

     

 

 


From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Monday, July 18, 2005 6:34 PM
To: [email protected]
Subject: Re: [castor-user] DateFieldHandler usage!

 

Once you know the specific Date format you will implement with

you can use these DateFieldHandler methods (including checkValidity method)

----- Original Message -----

From: mesut çelik

Sent: Monday, July 18, 2005 12:06 PM

Subject: [castor-user] DateFieldHandler usage!

 

Hi all,

 

Is there any example for the usage of DateFieldHandler. I have a date tag within my xml file and after unmarshal and marshal operation its format unintentationally corrupt. How can i use datefieldhandler to manipulate and format my date data in the xml file?

 

 

 

 

Reply via email to