Hi,
I reproduced the problem and fixed it:
http://jira.nuxeo.org/browse/NXP-2440
It'll be available in the next release.
Thanks again for your tests and reports,
anahide.
Nel Taurisson a écrit :
> Hi,
>
> In fact, I've found out that I have two different problems dealing with
> dates and lists.
>
> 1) The first one (the one I reported before) appears with a list of
> elements that are of a complex type that contains a date element . In
> this case, the date get setted ok but I have an execption when going on
> the modify tab.
>
> -------------------------
> Extract from the schema :
>
> <xs:complexType name="complexWithDateType">
> <xs:sequence>
> <xs:element name="aString" type="xs:string"/>
> <xs:element name="aDate" type="xs:date"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="complexWithDateList">
> <xs:sequence>
> <xs:element maxOccurs="unbounded" minOccurs="0" name="item"
> type="skdocEmfFt:complexWithDat
> eType"/>
> </xs:sequence>
> </xs:complexType>
> <xs:element name="complexWithDate" type="skdocEmfFt:complexWithDateList"/>
>
> -------------------------
> Extract from the layout :
>
> <widget name="complexWithDate" type="list">
> <translated>true</translated>
> <labels>
> <label
> mode="any">org.skinsoft.skdoc.ft.label.SkdocEmfFt.multipleDate.complexWithDate</label>
> </labels>
> <fields>
> <field>skdocEmfFt:complexWithDate</field>
> </fields>
> <subWidgets>
> <widget name="aString" type="text">
> <translated>true</translated>
> <labels>
> <label
> mode="any">org.skinsoft.skdoc.ft.label.SkdocEmfFt.multipleDate.complexWithDate.aString</label>
> </labels>
> <fields>
> <field>aString</field>
> </fields>
> </widget>
> <widget name="aDate" type="datetime">
> <translated>true</translated>
> <labels>
> <label
> mode="any">org.skinsoft.skdoc.ft.label.SkdocEmfFt.multipleDate.complexWithDate.aDate</label>
> </labels>
> <fields>
> <field>aDate</field>
> </fields>
> <properties widgetMode="any">
> <property
> name="pattern">#{nxu:basicDateAndTimeFormater()}</property>
> </properties>
> </widget>
> </subWidgets>
> </widget>
>
> ---------------
> The exception :
>
>
> java.lang.IllegalArgumentException: Cannot format given Object as a Date
> at java.text.DateFormat.format(DateFormat.java:281)
> at java.text.Format.format(Format.java:140)
> at
> javax.faces.convert.DateTimeConverter.getAsString(DateTimeConverter.java:448)
> at
> com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:469)
> at
> org.nuxeo.ecm.platform.ui.web.component.date.InputDateTimeRenderer.encodeBegin(InputDateTimeRenderer.java:79)
>
>
>
>
> 2) The second one appears with a list of dates. But maybe the schema
> declaration is not supported (it works with xs:string so I thought it
> would with xs:date). The exception occurs when I hit the save button and
> the value is not stored in the document.
>
> -------------------------
> Extract from the schema :
> <xs:simpleType name="dateListList">
> <xs:list itemType="xs:date"/>
> </xs:simpleType>
> <xs:element name="dateList" type="skdocEmfFt:dateListList"/>
>
> -------------------------
> Extract from the layout :
> <widget name="dateList" type="list">
> <translated>true</translated>
> <labels>
> <label
> mode="any">org.skinsoft.skdoc.ft.label.SkdocEmfFt.multipleDate.dateList</label>
> </labels>
> <fields>
> <field>skdocEmfFt:dateList</field>
> </fields>
> <subWidgets>
> <widget name="dateList_item" type="datetime">
> <translated>true</translated>
> <labels>
> <label mode="any"></label>
> </labels>
> <fields>
> <field></field>
> </fields>
> <properties widgetMode="any">
> <property
> name="pattern">#{nxu:basicDateAndTimeFormater()}</property>
> </properties>
> </widget>
> </subWidgets>
> </widget>
>
> ---------------
> The exception :
>
> 16:28:46,163 ERROR [STDERR] java.lang.ArrayStoreException
> 16:28:46,164 ERROR [STDERR] at java.lang.System.arraycopy(Native Method)
> 16:28:46,164 ERROR [STDERR] at
> java.util.ArrayList.toArray(ArrayList.java:306)
> 16:28:46,164 ERROR [STDERR] at
> org.nuxeo.ecm.core.api.model.impl.ArrayProperty.normalize(ArrayProperty.java:71)
> 16:28:46,164 ERROR [STDERR] at
> org.nuxeo.ecm.core.api.model.impl.AbstractProperty.setValue(AbstractProperty.java:309)
> 16:28:46,164 ERROR [STDERR] at
> org.nuxeo.ecm.core.api.model.impl.AbstractProperty.setValue(AbstractProperty.java:325)
> 16:28:46,164 ERROR [STDERR] at
> org.nuxeo.ecm.core.api.impl.DataModelImpl.setData(DataModelImpl.java:103)
> 16:28:46,164 ERROR [STDERR] at
> org.nuxeo.ecm.core.api.impl.DocumentModelImpl.setProperty(DocumentModelImpl.java:689)
> 16:28:46,164 ERROR [STDERR] at
> org.nuxeo.ecm.platform.ui.web.resolver.DocumentModelResolver.setValue(DocumentModelResolver.java:200)
>
>
> Thanks.
>
> Nel
--
Anahide Tchertchian, Nuxeo
Mail: [EMAIL PROTECTED] - Tel: +33 (0)1 40 33 79 87
http://www.nuxeo.com - http://www.nuxeo.org
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm