You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2018/04/27 13:14:48 UTC

[myfaces-tobago] 02/03: TOBAGO-1843: Demo

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 9f8fc8cdc32abcb80e51034a2c499c79d0f92b04
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Fri Apr 27 15:12:08 2018 +0200

    TOBAGO-1843: Demo
    
    progress on date pattern...
---
 .../webapp/content/40-test/1040-date/date.xhtml    |   3 +-
 .../40-test/1041-date-pattern/date-pattern.js      | 113 +++++
 .../40-test/1041-date-pattern/date-pattern.test.js |  88 ++++
 .../40-test/1041-date-pattern/date-pattern.xhtml   | 491 +++++++++++++++++++++
 4 files changed, 693 insertions(+), 2 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1040-date/date.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1040-date/date.xhtml
index ec6c493..f52cce9 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1040-date/date.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1040-date/date.xhtml
@@ -19,8 +19,7 @@
 
 <ui:composition template="/main.xhtml"
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                xsi:schemaLocation="http://myfaces.apache.org/tobago/component ">
+                xmlns:ui="http://java.sun.com/jsf/facelets">
   <ui:param name="title" value="#{demoBundle.date}"/>
 
   <tc:date id="dateNoPattern"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.js
new file mode 100644
index 0000000..5d6efe2
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.js
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+TestDateTime = {};
+
+// TODO: to be reimplemented!!!
+
+TestDateTime.init = function () {
+
+  var panel = jQuery("#page\\:jquery_date_time_pattern");
+  var inputs = panel.find(".tobago-in, .tobago-date");
+
+  for (var i = 0; i < inputs.length; i += 5) {
+    var javaPattern = inputs.eq(i);
+    var javaFormatted = inputs.eq(i + 1);
+    var jQueryUIDatePattern = inputs.eq(i + 2);
+    var jQueryUITimePattern = inputs.eq(i + 3);
+    var jQueryUIFormatted = inputs.eq(i + 4);
+    var result = jQueryUIFormatted.next();
+
+    var pattern = javaFormatted.data("tobago-pattern");
+    javaPattern.val(pattern);
+
+    var analyzed = Tobago.DateTime.analyzePattern(pattern);
+
+    jQueryUIDatePattern.val(analyzed.dateFormat);
+    jQueryUITimePattern.val(analyzed.timeFormat);
+
+    try {
+      var javaValue = javaFormatted.val();
+      var date = null; // type: JS date
+      var time = null; // type: jQuery UI time object
+      var jQueryValue = null;
+      var i18n = javaFormatted.data("tobago-date-time-i18n");
+      switch (analyzed.type) {
+        case "datetime":
+          // todo: use moment.js
+          date = jQuery.datepicker.parseDateTime(
+              analyzed.dateFormat, analyzed.timeFormat, javaValue, i18n, {
+                separator: analyzed.separator,
+                // workaround for bug: https://github.com/trentrichardson/jQuery-Timepicker-Addon/issues/736
+                timeFormat: analyzed.timeFormat
+              }
+          );
+          time = {
+            hour: date.getHours(),
+            minute: date.getMinutes(),
+            second: date.getSeconds(),
+            millisec: date.getMilliseconds(),
+            microsec: date.getMicroseconds()
+          };
+          // todo: use moment.js
+          jQueryValue
+              = jQuery.datepicker.formatDate(analyzed.dateFormat, date, i18n)
+              + analyzed.separator
+              + jQuery.datepicker.formatTime(analyzed.timeFormat, time, i18n);
+          break;
+        case "date":
+          // todo: use moment.js
+          date = jQuery.datepicker.parseDate(analyzed.dateFormat, javaValue, i18n);
+          jQueryValue = jQuery.datepicker.formatDate(analyzed.dateFormat, date, i18n);
+          break;
+        case "time":
+          // todo: use moment.js
+          time = jQuery.datepicker.parseTime(analyzed.timeFormat, javaValue, i18n);
+          jQueryValue = jQuery.datepicker.formatTime(analyzed.timeFormat, time, i18n);
+          break;
+        default:
+          console.error("invalid: not date-pattern nor time-pattern");  // @DEV_ONLY
+          jQueryValue = "no type";
+      }
+      jQueryUIFormatted.val(jQueryValue);
+
+    } catch (e) {
+      console.error(e);
+    }
+
+    if (javaFormatted.val() !== jQueryUIFormatted.val()) {
+      jQueryUIFormatted.addClass("tobago-in-markup-error");
+
+      if (javaPattern.hasClass("tobago-in-markup-error")) {
+        result.addClass("tobago-label-markup-warn");
+        result.html("java pattern broken");
+      } else {
+        result.addClass("tobago-label-markup-error");
+        result.html("pattern conversion failed");
+      }
+    } else {
+      result.addClass("tobago-label-markup-info");
+      if (javaPattern.hasClass("tobago-in-markup-error")) {
+        result.html("fixed");
+      } else {
+        result.html("okay");
+      }
+    }
+  }
+};
+
+Tobago.registerListener(TestDateTime.init, Tobago.Phase.DOCUMENT_READY);
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.test.js
new file mode 100644
index 0000000..ae7c2b2
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.test.js
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+QUnit.test("test patterns", function (assert) {
+
+  assert.ok(false);
+  TestDateTime.testDate();
+  TestDateTime.testTime();
+  TestDateTime.testBoth();
+});
+
+
+TestDateTime.testDate = function () {
+
+  var date;
+  var format = "dd.mm.yy";
+  var initial = "13.05.2014";
+  var result;
+
+  date = moment(initial, format);
+  result = moment(date).format(format);
+
+  if (result !== initial) {
+    console.error("Error!");
+  } else {
+    console.info("Okay!");
+  }
+
+};
+
+TestDateTime.testTime = function () {
+
+  var date;
+  var format = "HH:mm:ss";
+  var initial = "14:06:55";
+  var result;
+
+  date = moment(initial, format);
+  result = moment(date).format(format);
+
+  if (result !== initial) {
+    console.error("Error!");
+  } else {
+    console.info("Okay!");
+  }
+
+};
+
+TestDateTime.testBoth = function () {
+
+  var date, dateT;
+  var formatD = "dd.mm.yy";
+  var formatT = "HH:mm:ss";
+  var initial = "13.05.2014 13:05:55";
+  var result;
+  var separator = " ";
+
+  date = moment(initial, formatD + ' ' +  formatT);
+  dateT = {
+    hour: date.getHours(),
+    minute: date.getMinutes(),
+    second: date.getSeconds(),
+    millisec: date.getMilliseconds(),
+    microsec: date.getMicroseconds()
+  };
+  result = moment(date).format(formatD) + separator + jQuery.datepicker.formatTime(formatT, dateT);
+
+  if (result !== initial) {
+    console.error("Error!");
+  } else {
+    console.info("Okay!");
+  }
+
+};
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.xhtml
new file mode 100644
index 0000000..c6e29da
--- /dev/null
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/1041-date-pattern/date-pattern.xhtml
@@ -0,0 +1,491 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<f:view
+    locale="DE"
+    xmlns:tc="http://myfaces.apache.org/tobago/component"
+    xmlns:f="http://java.sun.com/jsf/core">
+
+  <tc:page id="page">
+
+    <tc:script file="date-pattern.js"/>
+
+    <tc:section label="TODO"></tc:section>
+
+    <tc:gridLayout id="jquery_date_time_pattern" columns="2fr 2fr 2fr 1fr 1fr 2fr 2fr">
+
+      <tc:label value="Name"/>
+      <tc:label value="Java Pattern"/>
+      <tc:label value="Java Formatted"/>
+      <tc:label value="jQuery UI Pattern">
+        <tc:gridLayoutConstraint columnSpan="2"/>
+      </tc:label>
+      <tc:label value="jQuery UI Formatted"/>
+      <tc:label value="Result"/>
+
+      <tc:label value="Comment"/>
+      <tc:out value="Error means, that the pattern that comes from the server is invalid.
+    This is defined manually on the page."/>
+      <tc:out/>
+      <tc:out value="date"/>
+      <tc:out value="time"/>
+      <tc:out value="Error means, that the date parsed and formatted is unequal to the original.
+    The error state is computed with the JS functions."/>
+      <tc:out/>
+
+      <!-- y - year -->
+
+      <tc:label value="1 y (wrong, but fixable)"/>
+      <tc:in readonly="true" markup="error"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.y"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="2 y"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.yy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="3 y (wrong, but fixable)"/>
+      <tc:in readonly="true" markup="error"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.yyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="4 y"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="5 y (can't fix)"/>
+      <tc:in readonly="true" markup="error"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.yyyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="6 y (can't fix)"/>
+      <tc:in readonly="true" markup="error"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.yyyyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- M - month -->
+
+      <tc:label value="1 M"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.M.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="2 M"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="3 M"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd. MMM yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="4 M"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd. MMMM yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="5 M"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd. MMMMM yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- L - month (stand alone) -->
+
+      <!--
+          <tc:label value="1 L"/>
+          <tc:in readonly="true"/>
+          <tc:date value="#{dateController.once}">
+            <f:convertDateTime pattern="L"/>
+          </tc:date>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:label/>
+
+          <tc:label value="2 L"/>
+          <tc:in readonly="true"/>
+          <tc:date value="#{dateController.once}">
+            <f:convertDateTime pattern="LL"/>
+          </tc:date>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:label/>
+
+          <tc:label value="3 L"/>
+          <tc:in readonly="true"/>
+          <tc:date value="#{dateController.once}">
+            <f:convertDateTime pattern="LLL"/>
+          </tc:date>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:label/>
+
+          <tc:label value="4 L"/>
+          <tc:in readonly="true"/>
+          <tc:date value="#{dateController.once}">
+            <f:convertDateTime pattern="LLLL"/>
+          </tc:date>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:label/>
+
+          <tc:label value="5 L"/>
+          <tc:in readonly="true"/>
+          <tc:date value="#{dateController.once}">
+            <f:convertDateTime pattern="LLLLL"/>
+          </tc:date>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:in readonly="true"/>
+          <tc:label/>
+      -->
+
+      <!-- d - day -->
+
+      <tc:label value="1 d"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="d.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="2 d"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="3 d (can't fix)"/>
+      <tc:in readonly="true" markup="error"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="ddd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- E - day name in week -->
+
+      <tc:label value="1 E"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="E, dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="2 E"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="EE, dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="3 E"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="EEE, dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="4 E"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="EEEE, dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="5 E"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="EEEEE, dd.MM.yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+
+      <!-- D - day in year -->
+
+      <tc:label value="1 D"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="D yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="2 D"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="DD yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="3 D"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="DDD yyyy"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- dateStyle -->
+
+      <tc:label value="dateStyle=short"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="short"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="dateStyle=medium"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="medium"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="dateStyle=long"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="long"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="dateStyle=full"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="full"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- time -->
+
+      <tc:label value="?"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="HH:mm:ss" type="time"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- timeStyle -->
+
+      <tc:label value="timeStyle=short"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime timeStyle="short" type="time"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="timeStyle=medium"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime timeStyle="medium" type="time"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="timeStyle=long"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime timeStyle="long" type="time"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="timeStyle=full"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime timeStyle="full" type="time"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- date time -->
+
+      <tc:label value="?"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss.SSS"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <!-- dateStyle + TimeStyle -->
+
+      <tc:label value="dateStyle=timeStyle=short"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="short" timeStyle="short" type="both"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="dateStyle=timeStyle=medium"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="medium" timeStyle="medium" type="both"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="dateStyle=timeStyle=long"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="long" timeStyle="long" type="both"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+      <tc:label value="dateStyle=timeStyle=full"/>
+      <tc:in readonly="true"/>
+      <tc:date value="#{dateController.once}">
+        <f:convertDateTime dateStyle="full" timeStyle="full" type="both"/>
+      </tc:date>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:in readonly="true"/>
+      <tc:label/>
+
+    </tc:gridLayout>
+
+    <tc:script file="datetime.js"/>
+
+  </tc:page>
+</f:view>

-- 
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.