FAQ
Author: lofwyr
Date: Wed Jun 15 12:33:38 2016
New Revision: 1748574

URL: http://svn.apache.org/viewvc?rev=1748574&view=rev
Log:
TOBAGO 1544
[developed by hnoeth]

Added:
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/10-tx/
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/10-tx/tx.xhtml
Modified:
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DateController.java
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/21-buttons-customizer/buttons-customizer.xhtml
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
     myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DateController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DateController.java?rev=1748574&r1=1748573&r2=1748574&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DateController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/DateController.java Wed Jun 15 12:33:38 2016
@@ -25,9 +25,9 @@ import org.slf4j.LoggerFactory;
  import javax.enterprise.context.RequestScoped;
  import javax.inject.Named;
  import java.io.Serializable;
-import java.util.Calendar;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
  import java.util.Date;
-import java.util.TimeZone;

  @RequestScoped
  @Named
@@ -37,11 +37,16 @@ public class DateController implements S

    private Date once;
    private Date onchange;
- private Date randomTimeZoneDate;
+ private Date submitDate;

    public DateController() {
      once = new Date();
- randomTimeZoneDate = new Date();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ try {
+ submitDate = sdf.parse("2016-05-22");
+ } catch (ParseException e) {
+ LOG.error("", e);
+ }
    }

    public Date getOnce() {
@@ -64,10 +69,11 @@ public class DateController implements S
      return new Date();
    }

- public Date getDateWithRandomTimezone() {
- Calendar cal = Calendar.getInstance();
- int i = (int) (Math.random() * TimeZone.getAvailableIDs().length);
- cal.setTimeZone(TimeZone.getTimeZone(TimeZone.getAvailableIDs()[i]));
- return cal.getTime();
+ public Date getSubmitDate() {
+ return submitDate;
+ }
+
+ public void setSubmitDate(Date submitDate) {
+ this.submitDate = submitDate;
    }
  }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java?rev=1748574&r1=1748573&r2=1748574&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/ToolBarCustomizer.java Wed Jun 15 12:33:38 2016
@@ -41,12 +41,9 @@ public class ToolBarCustomizer implement

    public String resetList() {
      list = new ArrayList<Item>(Arrays.asList(
-
- // TODO: load data from webapp/bestpractice/tool-bar-item*.xhtml
-
- new Item("New"),
- new Item("Edit"),
- new Item("Delete")
+ new Item("new"),
+ new Item("edit"),
+ new Item("delete")
      ));

      return null;
@@ -64,7 +61,7 @@ public class ToolBarCustomizer implement
    public void itemDown(final ActionEvent event) {
      final Item item = (Item) ((UIParameter) event.getComponent().getChildren().get(0)).getValue();
      final int oldIndex = list.indexOf(item);
- if (oldIndex < list.size()) {
+ if (oldIndex < list.size() - 1) {
        list.remove(item);
        list.add(oldIndex + 1, item);
      }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml?rev=1748574&r1=1748573&r2=1748574&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml Wed Jun 15 12:33:38 2016
@@ -39,13 +39,13 @@
      <p>The <code>value</code> must be a
        <tc:link label="Date" link="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html"/>
        or a string with a matching pattern.</p>
- <pre><code class="language-markup">&lt;tc:date label="Date" value="18.03.2016"&gt;
+ <pre><code class="language-markup">&lt;tc:date label="Date" value=\#{dateController.now}"&gt;
    &lt;f:convertDateTime pattern="dd.MM.yyyy"/&gt;
  &lt;/tc:date&gt;</code></pre>
- <tc:date id="d1" label="Date" value="#{dateController.now}">
+ <tc:date id="dnormal" label="Date" value="#{dateController.now}">
        <f:convertDateTime pattern="dd.MM.yyyy"/>
      </tc:date>
- <tc:date id="d2" label="Read Only" readonly="true" value="#{dateController.now}">
+ <tc:date id="dreadonly" label="Read Only" readonly="true" value="#{dateController.now}">
        <f:convertDateTime pattern="dd.MM.yyyy"/>
      </tc:date>
      <tc:date id="d3" label="Disabled" disabled="true" value="#{dateController.now}">
@@ -56,7 +56,8 @@
      </tc:date>
    </tc:section>
    <tc:section label="Focus">
- <p>The following date should be selected after reloading the page. This can be done with the attribute <code>focus</code>.</p>
+ <p>The following date should be selected after reloading the page. This can be done with the attribute
+ <code>focus</code>.</p>
          <pre><code class="language-markup">&lt;tc:date label="Date (focus)" focus="true"&gt;
    &lt;f:convertDateTime pattern="dd.MM.yyyy"/&gt;
  &lt;/tc:date&gt;</code></pre>
@@ -166,6 +167,19 @@
        <f:convertDateTime dateStyle="full" timeStyle="full" type="both"/>
      </tc:date>
    </tc:section>
+ <tc:section label="Submit">
+ <tc:form id="fsbmt">
+ <p>Press the button to submit the date to the server. The output field show the current value.
+ The date can be changed with the datepicker or by entering a valid date in the textfield.</p>
+ <tc:date id="sbmtinput" label="Input" value="#{dateController.submitDate}">
+ <f:convertDateTime pattern="dd.MM.yyyy"/>
+ </tc:date>
+ <tc:out id="sbmtoutput" label="Output" value="#{dateController.submitDate}">
+ <f:convertDateTime pattern="dd.MM.yyyy"/>
+ </tc:out>
+ <tc:button id="sbmtbutton" label="Submit"/>
+ </tc:form>
+ </tc:section>
    <tc:section label="Ajax">
      <p>The outputfield in this example, display the given date.
        With <code class="language-markup">&lt;f:ajax render="outputfield"/></code>,
@@ -173,7 +187,7 @@
        after the date changed.
        The date can be changed by button or by entering a valid date in the textfield. If the date is not valid,
        it won't be adopted.</p>
- <tc:date id="d14" label="On Change" value="#{dateController.onchange}">
+ <tc:date id="ajaxinput" label="On Change" value="#{dateController.onchange}">
        <f:convertDateTime pattern="dd.MM.yyyy"/>
        <f:ajax render="outputfield"/>
      </tc:date>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/21-buttons-customizer/buttons-customizer.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/21-buttons-customizer/buttons-customizer.xhtml?rev=1748574&r1=1748573&r2=1748574&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/21-buttons-customizer/buttons-customizer.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/21-buttons-customizer/buttons-customizer.xhtml Wed Jun 15 12:33:38 2016
@@ -18,15 +18,19 @@
  -->

  <ui:composition
- template="/main.xhtml"
- xmlns:tc="http://myfaces.apache.org/tobago/component"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:c="http://java.sun.com/jsp/jstl/core">
- <tc:box label="Customizable Buttons">
+ template="/main.xhtml"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+ <ui:param name="title" value="#{overviewBundle.buttons_customizer} &lt;tc:buttons>"/>
+ <p>The data of the model can also be loaded directly from the webapp directory.
+ So we can define an item for each facelet matching buttons-item-*.xhtml.
+ With this, we can create applications with pluggable UI. And we don't have to fight with bindings and
+ creating components in Java code.</p>

- <tc:out value="This page shows a flexible possiblility, but for most cases there are
- much simpler solutions."/>
+ <tc:section label="Customizable Button Group">
+ <p>This example shows a flexible possiblility, but for most cases there are much simpler solutions.</p>

      <tc:buttons id="buttons">
        <c:forEach items="#{customizer.list}" var="item">
@@ -60,10 +64,5 @@
      </tc:sheet>

      <tc:button label="Reset List" action="#{customizer.resetList}" image="fa-refresh"/>
-
- <tc:out value="The data of the model may also be loaded directly from the webapp directory.
- So we can define an Item for each facelet matching .../x-buttons-item-*.xhtml.
- With this, we can create applications with pluggable UI. And we don't have to fight with bindings and
- creating components in Java code."/>
- </tc:box>
+ </tc:section>
  </ui:composition>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/10-tx/tx.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/10-tx/tx.xhtml?rev=1748574&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/10-tx/tx.xhtml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/10-tx/tx.xhtml Wed Jun 15 12:33:38 2016
@@ -0,0 +1,50 @@
+<?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.
+-->
+
+<ui:composition template="/main.xhtml"
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:tx="http://myfaces.apache.org/tobago/extension"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+ <ui:param name="title" value="#{overviewBundle.tx}"/>
+ <p>The TX-library is no longer supported. Use components from the TC-library.</p>
+
+ <tc:section label="Replacements">
+ <p>Most components of the TX-library can be also found in the TC-library.
+ The names are still the same. For example instead of
+ <code class="language-markup">&lt;tx:in></code> and <code class="language-markup">&lt;tx:textarea></code>
+ you should be use
+ <code class="language-markup">&lt;tc:in></code> and <code class="language-markup">&lt;tc:textarea></code>.
+ However, there are a few exceptions described in the following sections.</p>
+
+ <tc:section label="&lt;tx:label>">
+ <p><code class="language-markup">&lt;tx:label></code> is not available anymore.
+ Please use <code class="language-markup">&lt;tc:label></code> or the <code>label</code> attribute instead.</p>
+ </tc:section>
+ <tc:section label="&lt;tx:menuCheckbox> &lt;tx:menuRadio>">
+ <p><code class="language-markup">&lt;tc:menu></code> is deprecated.
+ Use dropdown-menus instead. Have a look at 'Dropdown'-section of the
+ <tc:link label="#{overviewBundle.button_link}"
+ link="/faces/content/20-component/040-command/00-button+link/button+link.xhtml"/> page.</p>
+ </tc:section>
+ <tc:section label="&lt;tx:time">
+ <p><code class="language-markup">&lt;tx:time></code> has no counterpart of the same name.
+ Instead use <code class="language-markup">&lt;tc:date></code>.</p>
+ </tc:section>
+ </tc:section>
+</ui:composition>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml?rev=1748574&r1=1748573&r2=1748574&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml Wed Jun 15 12:33:38 2016
@@ -62,6 +62,7 @@
    <entry key="button_link">Link &amp; Button</entry>
    <entry key="default_command">Default Command</entry>
    <entry key="buttons">Button Group</entry>
+ <entry key="buttons_customizer">Button Group Customizer</entry>
    <entry key="menu">Menubar</entry>
    <entry key="container">Container</entry>
    <entry key="box">Content Box</entry>
@@ -124,6 +125,7 @@

    <!-- navigate : deprecated -->
    <entry key="deprecated">Deprecated</entry>
+ <entry key="tx">TX Tag Library</entry>
    <entry key="toolBar">Toolbar</entry>

    <entry key="validation-severity">Severity</entry>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml?rev=1748574&r1=1748573&r2=1748574&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml Wed Jun 15 12:33:38 2016
@@ -39,10 +39,6 @@
    <entry key="submit">Ãœbernehmen</entry>
    <entry key="cancel">Abbrechen</entry>

- <entry key="footer_previous">Zurück</entry>
- <entry key="footer_next">Weiter</entry>
- <entry key="footer_viewSource">Zeige Quellcode</entry>
-
  <!-- intro -->
    <entry key="intro_text">&lt;p&gt;Tobago ist ein User-Interface-Framework zur Erstellung von Webanwendungen.
      Das Framework stützt sich auf JavaServer Faces ab. Das Kernstück bildet ein Theme-orientiertes

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedJun 15, '16 at 12:33p
activeJun 15, '16 at 12:33p
posts1
users1
websitemyfaces.apache.org

1 user in discussion

Lofwyr: 1 post

People

Translate

site design / logo © 2019 Grokbase