12-02-2011 01:01 AM
Hi,
I'm trying to get a custom template layout to set to a date field in the database.
In the custom template the field is linked to a dropdown with a set of pre-specified date values, which matches up against the date format in the db.
<widget name="data editor" type="template">
<labels>
<label mode="any">Data Editor</label>
</labels>
<translated>false</translated>
<fields>
...
<field>ad:initialPrintPublicationDate/text</field>
</fields>
<properties mode="any">
<property name="template">/widgets/vehicle_data_editor_widget_private.xhtml</property>
</properties>
</widget>
Is it possible to designate this field as a date field, while all the other fields that are being passed in a text fields?
I've found that you can you append /
We are using nuxeo 5.3 btw...not sure if this complicates matters.
12-02-2011 08:12 AM
Hi, The field mapping "ad:initialPrintPublicationDate/text" is not correct: this will not set the value property on your field. The best option here relies in what's the widget template "vehicle_data_editor_widget_private.xhtml" is doing. In your case you should use a JSF converter to handle the conversion between the text field selected by the user, and the date you'd like to set on the property (either creating a Date or Calendar instance should work).
12-02-2011 08:12 AM
Hi, The field mapping "ad:initialPrintPublicationDate/text" is not correct: this will not set the value property on your field. The best option here relies in what's the widget template "vehicle_data_editor_widget_private.xhtml" is doing. In your case you should use a JSF converter to handle the conversion between the text field selected by the user, and the date you'd like to set on the property (either creating a Date or Calendar instance should work).
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.