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