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 2016/08/03 08:43:28 UTC

svn commit: r1755046 - in /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main: java/org/apache/myfaces/tobago/example/demo/overview/ webapp/content/20-component/080-sheet/00-content/ webapp/content/20-component/080-sheet/10-sort/ webapp/c...

Author: lofwyr
Date: Wed Aug  3 08:43:27 2016
New Revision: 1755046

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

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/00-content/sheet-column-content.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/55-staticheader/sheet-static-header.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java?rev=1755046&r1=1755045&r2=1755046&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java Wed Aug  3 08:43:27 2016
@@ -300,24 +300,6 @@ public class OverviewController implemen
     this.sheetConfig = sheetConfig;
   }
 
-  public List<String> getInputSuggestItems(final UIInput component) {
-    String substring = (String) component.getSubmittedValue();
-    if (substring == null) {
-      substring = "";
-    }
-    LOG.info("Creating items for substring: '" + substring + "'");
-    final List<String> result = new ArrayList<String>();
-    for (final String name : LocaleList.COUNTRY_LANGUAGE) {
-      if (StringUtils.containsIgnoreCase(name, substring)) {
-        result.add(name);
-      }
-      if (result.size() > 100) { // this value should not be smaller than the value of the suggest control
-        break;
-      }
-    }
-    return result;
-  }
-
   public String noop() {
     LOG.info("noop");
     return null;

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/00-content/sheet-column-content.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/00-content/sheet-column-content.xhtml?rev=1755046&r1=1755045&r2=1755046&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/00-content/sheet-column-content.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/00-content/sheet-column-content.xhtml Wed Aug  3 08:43:27 2016
@@ -31,7 +31,7 @@
              link="#{overviewBundle.tagDocUrl}/column.html"/></p>
 
   <tc:section label="Example">
-    <p>In this example, the second column contain a tab group. Also a
+    <p>The second column contain a tab group. Also a
       <code class="language-markup"><tc:style/></code> tag is used to set the maximal height of the table.
       As a result, a vertical scrollbar is shown.
       The header is hidden by set <code>showHeader</code> to 'false'.</p>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml?rev=1755046&r1=1755045&r2=1755046&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml Wed Aug  3 08:43:27 2016
@@ -61,7 +61,7 @@
       ...
     </code></pre>
 
-    <tc:sheet id="s2" value="#{sheetSortingController.solarList}" var="solarobject" rows="4"
+    <tc:sheet id="s2" value="#{sheetSortingController.solarList}" var="object" rows="4"
               sortActionListener="#{sheetSortingController.sheetSorter}">
       <tc:column id="namecol" label="Name" sortable="true">
         <tc:out value="#{object.name}"/>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml?rev=1755046&r1=1755045&r2=1755046&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml Wed Aug  3 08:43:27 2016
@@ -22,7 +22,7 @@
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core">
-  <ui:param name="title" value="#{overviewBundle.sheet} markups"/>
+  <ui:param name="title" value="#{overviewBundle.sheet_markup}"/>
   <p>This example, demonstrate the different markups defined for sheet.
     These markups reflecting the styles from bootstrap.
     <tc:selectOneRadio value="#{sheetController.automaticLayout}">

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/55-staticheader/sheet-static-header.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/55-staticheader/sheet-static-header.xhtml?rev=1755046&r1=1755045&r2=1755046&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/55-staticheader/sheet-static-header.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/55-staticheader/sheet-static-header.xhtml Wed Aug  3 08:43:27 2016
@@ -18,27 +18,56 @@
 -->
 
 <ui:composition template="/main.xhtml"
+                xmlns="http://www.w3.org/1999/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:ui="http://java.sun.com/jsf/facelets">
   <ui:param name="title" value="#{overviewBundle.sheet_static_header}"/>
-  <p>
-
-
-    For simple column headers, use the lable attribute of the tc:column.
-    For more complex headers, which can span over columns and/or rows use a
-
-    &lt;f:facet name='header'&gt; in the sheet.
-
-  </p>
+  <p>There are several ways to display the header.
+    For simple column headers, use the attribute <code>label</code> of
+    <code class="language-markup">&lt;tc:column></code>.
+    For more complex header which span over columns and/or rows please go to the
+    <tc:link label="#{overviewBundle.sheet_multi_header}"
+             link="/faces/content/20-component/080-sheet/60-multiheader/sheet-multi-header.xhtml"/> section.</p>
+  <p>Tag Library Documentation:
+    <tc:link label="&lt;tc:sheet/>" image="image/feather-leaf.png"
+             link="#{overviewBundle.tagDocUrl}/sheet.html"/>
+    |
+    <tc:link label="&lt;tc:column/>" image="image/feather-leaf.png"
+             link="#{overviewBundle.tagDocUrl}/column.html"/></p>
 
   <tc:section label="Basics">
-
+    <p>A sheet with six rows. The name of the columns is set by the <code>label</code> attribute.</p>
+    <pre><code class="language-markup">&lt;tc:sheet value="\#{sheetController.solarList}" var="object" rows="6">
+  &lt;tc:column label="Name">
+    &lt;tc:out value="\#{object.name}"/>
+  ...</code></pre>
+    <tc:sheet id="simpleSheet" value="#{sheetController.solarList}" var="object" rows="6">
+      <tc:column label="Name">
+        <tc:out value="#{object.name}"/>
+      </tc:column>
+      <tc:column label="Orbit">
+        <tc:out value="#{object.orbit}"/>
+      </tc:column>
+      <tc:column label="Period (Days)">
+        <tc:out value="#{object.period}"/>
+      </tc:column>
+      <tc:column label="Discoverer">
+        <tc:out value="#{object.discoverer}"/>
+      </tc:column>
+      <tc:column label="Year">
+        <tc:out value="#{object.discoverYear}"/>
+      </tc:column>
+    </tc:sheet>
   </tc:section>
 
-  <tc:section label="Simple Header">
-    <tc:sheet id="s1" value="#{sheetController.solarList}" var="object" rows="7"
-              columns="1;1;2;2;1">
+  <tc:section label="Scrolling Header">
+    <p>A sheet with ten rows and a maximal height of 500px. The header is scrollable.</p>
+    <p>To get a scrolling header, you have to set a maximal height
+      and the width of all columns must be calculated automatically.</p>
+    <pre><code class="language-markup">&lt;tc:sheet value="\#{sheetController.solarList}" var="object" rows="10">
+  &lt;tc:style maxHeight="500px"/>
+  ...</code></pre>
+    <tc:sheet id="scrollHeaderSheet" value="#{sheetController.solarList}" var="object" rows="10">
       <tc:style maxHeight="500px"/>
       <tc:column label="Name">
         <tc:out value="#{object.name}"/>
@@ -58,48 +87,32 @@
     </tc:sheet>
   </tc:section>
 
-  <tc:section label="Basics">
-  <tc:sheet id="s11" value="#{sheetController.solarList}" var="solarobject" rows="4">
-  <tc:style maxHeight="500px"/>
-  <tc:column label="Name">
-  <tc:out value="#{object.name}"/>
-  </tc:column>
-  <tc:column label="Orbit">
-  <tc:out value="#{object.orbit}"/>
-  </tc:column>
-  <tc:column label="Period (Days)">
-  <tc:out value="#{object.period}"/>
-  </tc:column>
-  <tc:column label="Discoverer">
-  <tc:out value="#{object.discoverer}"/>
-  </tc:column>
-  <tc:column label="Year">
-  <tc:out value="#{object.discoverYear}"/>
-  </tc:column>
-  </tc:sheet>
-
-  </tc:section>
-
-  <tc:section label="Static Header">
-  <tc:sheet id="s2" value="#{sheetController.solarList}" var="solarobject" rows="4"
-  columns="3*;2*;3*;*;*">
-  <tc:style maxHeight="500px"/>
-  <tc:column label="Name">
-  <tc:out value="#{object.name}"/>
-  </tc:column>
-  <tc:column label="Orbit">
-  <tc:out value="#{object.orbit}"/>
-  </tc:column>
-  <tc:column label="Period (Days)">
-  <tc:out value="#{object.period}"/>
-  </tc:column>
-  <tc:column label="Discoverer">
-  <tc:out value="#{object.discoverer}"/>
-  </tc:column>
-  <tc:column label="Year">
-  <tc:out value="#{object.discoverYear}"/>
-  </tc:column>
-  </tc:sheet>
+  <tc:section label="Header always visible">
+    <p>A sheet with ten rows and a maximal height of 500px. The header is static.</p>
+    <p>To get a static header, you have to set a maximal height and the
+      <code>columns</code> attribute must be used to set the width of the columns manually.</p>
+    <pre><code class="language-markup">&lt;tc:sheet value="\#{sheetController.solarList}" var="object" rows="10"
+      columns="3*;80px;20%;2*;1*">
+  &lt;tc:style maxHeight="500px"/>
+  ...</code></pre>
+    <tc:sheet id="alwaysVisibleHeaderSheet" value="#{sheetController.solarList}" var="object" rows="10"
+              columns="3*;80px;20%;2*;1*">
+      <tc:style maxHeight="500px"/>
+      <tc:column label="Name">
+        <tc:out value="#{object.name}"/>
+      </tc:column>
+      <tc:column label="Orbit">
+        <tc:out value="#{object.orbit}"/>
+      </tc:column>
+      <tc:column label="Period (Days)">
+        <tc:out value="#{object.period}"/>
+      </tc:column>
+      <tc:column label="Discoverer">
+        <tc:out value="#{object.discoverer}"/>
+      </tc:column>
+      <tc:column label="Year">
+        <tc:out value="#{object.discoverYear}"/>
+      </tc:column>
+    </tc:sheet>
   </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=1755046&r1=1755045&r2=1755046&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 Aug  3 08:43:27 2016
@@ -83,6 +83,7 @@
   <entry key="sheet_sorting">Sorting</entry>
   <entry key="sheet_column_selector">Column Selector</entry>
   <entry key="sheet_column_event">Column Event</entry>
+  <entry key="sheet_markup">Markup</entry>
   <entry key="sheet_dropdown">Dropdown Box</entry>
   <entry key="sheet_filter">Filtering</entry>
   <entry key="sheet_static_header">Static Header</entry>