<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Make a custom template layout get/set from a date field in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/make-a-custom-template-layout-get-set-from-a-date-field/m-p/321096#M8097</link>
    <description>&lt;P&gt;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).&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2011 13:12:44 GMT</pubDate>
    <dc:creator>Anahide_Tchertc</dc:creator>
    <dc:date>2011-12-02T13:12:44Z</dc:date>
    <item>
      <title>Make a custom template layout get/set from a date field</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/make-a-custom-template-layout-get-set-from-a-date-field/m-p/321095#M8096</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to get a custom template layout to set to a date field in the database.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;widget name="data editor" type="template"&amp;gt;
			&amp;lt;labels&amp;gt;
				&amp;lt;label mode="any"&amp;gt;Data Editor&amp;lt;/label&amp;gt;
			&amp;lt;/labels&amp;gt;
			&amp;lt;translated&amp;gt;false&amp;lt;/translated&amp;gt;
			&amp;lt;fields&amp;gt;
                                     ...
				&amp;lt;field&amp;gt;ad:initialPrintPublicationDate/text&amp;lt;/field&amp;gt;
			&amp;lt;/fields&amp;gt;
			&amp;lt;properties mode="any"&amp;gt;
				&amp;lt;property name="template"&amp;gt;/widgets/vehicle_data_editor_widget_private.xhtml&amp;lt;/property&amp;gt;
			&amp;lt;/properties&amp;gt;
      &amp;lt;/widget&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is it possible to designate this field as a date field, while all the other fields that are being passed in a text fields?&lt;/P&gt;
&lt;P&gt;I've found that you can you append /&lt;PROPERTYNAME&gt; is it possible to structure this so that it will convert the value to and from a string?&lt;/PROPERTYNAME&gt;&lt;/P&gt;
&lt;P&gt;&lt;FIELD&gt;ad:initialPrintPublicationDate/text&lt;/FIELD&gt;&lt;/P&gt;
&lt;P&gt;We are using nuxeo 5.3 btw...not sure if this complicates matters.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2011 06:01:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/make-a-custom-template-layout-get-set-from-a-date-field/m-p/321095#M8096</guid>
      <dc:creator>mark_</dc:creator>
      <dc:date>2011-12-02T06:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Make a custom template layout get/set from a date field</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/make-a-custom-template-layout-get-set-from-a-date-field/m-p/321096#M8097</link>
      <description>&lt;P&gt;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).&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2011 13:12:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/make-a-custom-template-layout-get-set-from-a-date-field/m-p/321096#M8097</guid>
      <dc:creator>Anahide_Tchertc</dc:creator>
      <dc:date>2011-12-02T13:12:44Z</dc:date>
    </item>
  </channel>
</rss>

