Hi all,

I'm working on a custom document type that uses the 'datetime' widget. I'm 
having trouble persisting the date values on save. The calendar control works 
fine ... it's just not saving data. The remaining fields in the document type 
save data fine. It's only the datetime widgets that don't behave.

In my schema, I've tried data types xs:string, xs:date, and xs:dateTime but no 
luck. With xs:string, no values are saved. With xs:date and xs:dateTime, I get 
a java.lang.ClassCastException at org.nuxeo.ecm.core.storage.sql.db.Column.java 
at line 273. At this line, the code is trying to caste a 
java.util.GregorianCalendar object to a String.

This is in the 5.2 RC1 code base.

Here is a simple schema example. Also below is the datetime widget. Any help is 
appreciated.

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema 
<http://www.w3.org/2001/XMLSchema> "
           
targetNamespace="http://nuxeo.dnadirect.com/nuxeo/schemas/research-organizer/ 
<http://nuxeo.dnadirect.com/nuxeo/schemas/research-organizer/> "
           
xmlns:ro="http://nuxeo.dnadirect.com/nuxeo/schemas/research-organizer/ 
<http://nuxeo.dnadirect.com/nuxeo/schemas/research-organizer/> ">
<xs:element name="myDate" type="xs:dateTime"/>
</xs:schema>


>From layouts-contrib.xml:
                    <widget name="date" type="datetime">
                        <labels>
                            <label mode="any">Date</label>
                        </labels>
                        <fields>
                            <field>myDate</field>
                        </fields>
                    </widget>

Cheers,
Greg 


_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to