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/05/16 21:43:11 UTC
[myfaces-tobago] 01/02: demo: clean up
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 990df0784cb68bca0c05690906f3497327a9d51d
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed May 16 17:17:51 2018 +0200
demo: clean up
---
.../myfaces/tobago/example/data/SolarObject.java | 52 ----------------------
.../myfaces/tobago/example/demo/AstroData.java | 30 +++++++++++++
.../example/demo/SelectManyShuttleController.java | 13 ++++--
.../tobago/example/demo/SheetTreeController.java | 12 +++--
...eetController.java => SheetTestController.java} | 46 ++++++++-----------
.../example/test/UndefinedRowCountDataModel.java | 5 ++-
.../src/main/webapp/WEB-INF/faces-config.xml | 6 ---
.../10-getting-started/getting-started.xhtml | 6 ++-
.../sheet/sheet-auto-height-header-footer.xhtml | 8 ++--
.../90000-attic/sheet/sheet-auto-height-rows.xhtml | 8 ++--
.../90000-attic/sheet/sheet-auto-width.xhtml | 2 +-
.../90000-attic/sheet/sheet-bug-tobago-1090.xhtml | 2 +-
.../40-test/90000-attic/sheet/sheet-large.xhtml | 2 +-
.../90000-attic/sheet/sheet-multi-header.xhtml | 4 +-
.../40-test/90000-attic/sheet/sheet-paging-1.xhtml | 2 +-
.../90000-attic/sheet/sheet-paging-11.xhtml | 2 +-
.../90000-attic/sheet/sheet-paging-20.xhtml | 2 +-
.../40-test/90000-attic/sheet/sheet-reload.xhtml | 2 +-
.../40-test/90000-attic/sheet/sheet-selector.xhtml | 2 +-
.../40-test/90000-attic/sheet/sheet-simple.xhtml | 2 +-
.../sheet/sheet-unknown-row-count.xhtml | 2 +-
.../src/main/webapp/server-info.xhtml | 7 +++
22 files changed, 100 insertions(+), 117 deletions(-)
diff --git a/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java b/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
index e24b12a..31e0369 100644
--- a/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
+++ b/tobago-example/tobago-example-data/src/main/java/org/apache/myfaces/tobago/example/data/SolarObject.java
@@ -23,14 +23,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.faces.event.AjaxBehaviorEvent;
-import javax.swing.tree.DefaultMutableTreeNode;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;
@@ -199,58 +195,10 @@ public class SolarObject implements Serializable {
return name;
}
- public boolean isSelectionDisabled() {
- return number.equals("II");
- }
-
- @Deprecated
- public static SolarObject[] getArray() {
- return DATA;
- }
-
public static Stream<SolarObject> getDataStream() {
return Arrays.stream(DATA);
}
- public static List<SolarObject> getList() {
- final SolarObject[] array = getArray();
- final List<SolarObject> list = new ArrayList<>(array.length);
- Collections.addAll(list, array);
- return list;
- }
-
- public static DefaultMutableTreeNode getTree() {
- final SolarObject[] array = getArray();
- final Map<String, DefaultMutableTreeNode> cache = new HashMap<>();
- for (final SolarObject solar : array) {
- final DefaultMutableTreeNode node = new DefaultMutableTreeNode(solar);
- cache.put(solar.getName(), node);
- final String orbitName = solar.getOrbit();
- if (orbitName.equals("-")) {
- continue;
- }
- // adds a solar object as node to its orbit as tree child.
- cache.get(orbitName).add(node);
- }
- return cache.get("Sun");
- }
-
- public static List<SolarObject> getSatellites(final String center) {
- final List<SolarObject> collect = new ArrayList<>();
- final SolarObject[] all = getArray();
- for (final SolarObject anAll : all) {
- if (anAll.getOrbit().equals(center)) {
- collect.add(anAll);
- }
- }
- return collect;
- }
-
- @Deprecated
- public static SolarObject find(final String name) {
- return getDataStream().filter(solarObject -> solarObject.getName().equals(name)).findFirst().orElse(null);
- }
-
private static final SolarObject SUN = new SolarObject("Sun", "-", "-", 0, 0.0, 0.0, 0.0, "-", null);
private static final SolarObject EARTH =
new SolarObject("Earth", "III", "Sun", 149600, 365.26, 0.00, 0.02, "-", null);
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/AstroData.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/AstroData.java
index 7ed5691..133cf8a 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/AstroData.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/AstroData.java
@@ -24,10 +24,13 @@ import org.apache.myfaces.tobago.model.SelectItem;
import javax.inject.Named;
import javax.inject.Singleton;
+import javax.swing.tree.DefaultMutableTreeNode;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -66,6 +69,33 @@ public class AstroData implements Serializable {
.filter(solarObject -> Arrays.asList(filter).contains(solarObject.getName()));
}
+ public DefaultMutableTreeNode getAllAsTree() {
+ final Map<String, DefaultMutableTreeNode> cache = new HashMap<>();
+ for (final SolarObject solar : (Iterable<SolarObject>)findAll()::iterator) {
+ final DefaultMutableTreeNode node = new DefaultMutableTreeNode(solar);
+ cache.put(solar.getName(), node);
+ final String orbitName = solar.getOrbit();
+ if (orbitName.equals("-")) {
+ continue;
+ }
+ // adds a solar object as node to its orbit as tree child.
+ cache.get(orbitName).add(node);
+ }
+ return cache.get("Sun");
+ }
+
+ public List<SolarObject> getSatellites(final String center) {
+ final List<SolarObject> collect = new ArrayList<>();
+ for (final SolarObject solar : (Iterable<SolarObject>)findAll()::iterator) {
+ // todo: use lambda
+ if (solar.getOrbit().equals(center)) {
+ collect.add(solar);
+ }
+ }
+ return collect;
+ }
+
+
private List<SelectItem> createSelectItems(final List<SolarObject> objects) {
final List<SelectItem> list = new ArrayList<>();
for (SolarObject object : objects) {
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyShuttleController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyShuttleController.java
index 3c825ab..d4cd53c 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyShuttleController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyShuttleController.java
@@ -21,10 +21,11 @@ package org.apache.myfaces.tobago.example.demo;
import org.apache.myfaces.tobago.example.data.SolarObject;
+import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
+import javax.inject.Inject;
import javax.inject.Named;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -32,13 +33,17 @@ import java.util.List;
@Named
public class SelectManyShuttleController implements Serializable {
- private List<SolarObject> planets = new ArrayList<>();
+ @Inject
+ private AstroData astroData;
+
+ private List<SolarObject> planets;
private SolarObject[] selectedPlanets = new SolarObject[0];
private List<String> stars = Arrays.asList("Proxima Centauri", "Alpha Centauri", "Wolf 359", "Sirius");
private String[] selectedStars = new String[0];
- public SelectManyShuttleController() {
- planets = SolarObject.getSatellites("Sun");
+ @PostConstruct
+ public void init() {
+ planets = astroData.getSatellites("Sun");
}
public List<SolarObject> getPlanets() {
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetTreeController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetTreeController.java
index 1f79ecf..aa4dc79 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetTreeController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetTreeController.java
@@ -19,9 +19,9 @@
package org.apache.myfaces.tobago.example.demo;
-import org.apache.myfaces.tobago.example.data.SolarObject;
-
+import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
import javax.inject.Named;
import javax.swing.tree.DefaultMutableTreeNode;
import java.io.Serializable;
@@ -30,10 +30,14 @@ import java.io.Serializable;
@Named
public class SheetTreeController implements Serializable {
+ @Inject
+ private AstroData astroData;
+
private DefaultMutableTreeNode solarTree;
- public SheetTreeController() {
- solarTree = SolarObject.getTree();
+ @PostConstruct
+ public void init() {
+ solarTree = astroData.getAllAsTree();
}
public DefaultMutableTreeNode getSolarTree() {
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/SheetController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/SheetTestController.java
similarity index 54%
rename from tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/SheetController.java
rename to tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/SheetTestController.java
index 83195f0..c8752ab 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/SheetController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/SheetTestController.java
@@ -19,48 +19,38 @@
package org.apache.myfaces.tobago.example.test;
-import org.apache.myfaces.tobago.example.data.LocaleEntry;
-import org.apache.myfaces.tobago.example.data.LocaleList;
import org.apache.myfaces.tobago.example.data.SolarObject;
+import org.apache.myfaces.tobago.example.demo.AstroData;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.SessionScoped;
import javax.faces.model.DataModel;
+import javax.inject.Inject;
+import javax.inject.Named;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
-public class SheetController implements Serializable {
+@SessionScoped
+@Named
+public class SheetTestController implements Serializable {
- private SolarObject[] solarArray = SolarObject.getArray();
- private SolarObject[] solarArray3 = init3();
- private DataModel undefined = new UndefinedRowCountDataModel(solarArray);
+ @Inject
+ private AstroData astroData;
- public SheetController() {
- init3();
- }
+ private List<SolarObject> solarArray;
+ private DataModel undefined;
- private SolarObject[] init3() {
- final SolarObject[] help = new SolarObject[3];
- for (int i = 0; i < 3; i++) {
- help[i] = solarArray[i];
- }
- return help;
+ @PostConstruct
+ private void init() {
+ solarArray = astroData.findAll().collect(Collectors.toList());
+ undefined = new UndefinedRowCountDataModel(solarArray);
}
- // Create a copy for sorting, because the LocaleList.DATA is not modifiable.
- private List<LocaleEntry> localeList = new ArrayList<>(LocaleList.DATA);
-
- public SolarObject[] getSolarArray() {
+ public List<SolarObject> getSolarArray() {
return solarArray;
}
- public SolarObject[] getSolarArray3() {
- return solarArray3;
- }
-
- public List<LocaleEntry> getLocaleList() {
- return localeList;
- }
-
public DataModel getUndefined() {
return undefined;
}
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/UndefinedRowCountDataModel.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/UndefinedRowCountDataModel.java
index 68714f9..d66d819 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/UndefinedRowCountDataModel.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/UndefinedRowCountDataModel.java
@@ -22,11 +22,12 @@ package org.apache.myfaces.tobago.example.test;
import org.apache.myfaces.tobago.example.data.SolarObject;
import javax.faces.model.ArrayDataModel;
+import java.util.List;
public class UndefinedRowCountDataModel extends ArrayDataModel {
- public UndefinedRowCountDataModel(final SolarObject[] array) {
- super(array);
+ public UndefinedRowCountDataModel(final List<SolarObject> array) {
+ super(array.toArray());
}
@Override
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
index b8788d3..65a03ec 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
@@ -119,12 +119,6 @@
</managed-bean>
<managed-bean>
- <managed-bean-name>sheet</managed-bean-name>
- <managed-bean-class>org.apache.myfaces.tobago.example.test.SheetController</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
<managed-bean-name>sort</managed-bean-name>
<managed-bean-class>org.apache.myfaces.tobago.example.test.SheetSortController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/10-getting-started/getting-started.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/10-getting-started/getting-started.xhtml
index 6dbed3f..5a2e415 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/10-getting-started/getting-started.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/10-intro/10-getting-started/getting-started.xhtml
@@ -104,12 +104,16 @@ $ mvn jetty:run -Djsf=mojarra-2.2
$ mvn jetty:run -Djsf=mojarra-2.3</code></pre>
</tc:section>
- <!-- TODO -->
+ <!-- XXX -->
<p>
<tc:badge markup="warning" value="Warning: The example Jetty currently works not JSF 2.3 in combination with Java 9 or higher!" /><br/>
because of <code>java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter</code>, which is a problem with Jigsaw.
</p>
+ It's also possible to run the demo in TomEE from Maven directly
+
+ <pre><code class="language-bash">$ mvn clean package tomee:run -Djsf=provided</code></pre>
+
</tc:section>
</ui:composition>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-header-footer.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-header-footer.xhtml
index 91a4aa8..2d1d7af 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-header-footer.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-header-footer.xhtml
@@ -35,7 +35,7 @@
haeder: false
footer: false
-->
- <tc:sheet value="#{sheet.solarArray3}" id="sheet1" columns="1fr 1fr" var="luminary" rows="3"
+ <tc:sheet value="#{sheetTestController.solarArray3}" id="sheet1" columns="1fr 1fr" var="luminary" rows="3"
showHeader="false">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
@@ -49,7 +49,7 @@
haeder: true
footer: false
-->
- <tc:sheet value="#{sheet.solarArray3}" id="sheet2" columns="1fr 1fr" var="luminary" rows="3"
+ <tc:sheet value="#{sheetTestController.solarArray3}" id="sheet2" columns="1fr 1fr" var="luminary" rows="3"
showHeader="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
@@ -63,7 +63,7 @@
haeder: false
footer: true
-->
- <tc:sheet value="#{sheet.solarArray3}" id="sheet3" columns="1fr 1fr" var="luminary" rows="3"
+ <tc:sheet value="#{sheetTestController.solarArray3}" id="sheet3" columns="1fr 1fr" var="luminary" rows="3"
showHeader="false" showPagingAlways="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
@@ -77,7 +77,7 @@
haeder: true
footer: true
-->
- <tc:sheet value="#{sheet.solarArray3}" id="sheet4" columns="1fr 1fr" var="luminary" rows="3"
+ <tc:sheet value="#{sheetTestController.solarArray3}" id="sheet4" columns="1fr 1fr" var="luminary" rows="3"
showHeader="true" showPagingAlways="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-rows.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-rows.xhtml
index c90ed15..ae76d0c 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-rows.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-height-rows.xhtml
@@ -32,7 +32,7 @@
</f:facet>
<!-- fixed rows = 3 - show exactly 3 rows, but have more -->
- <tc:sheet value="#{sheet.solarArray}" id="sheet1" columns="1fr 1fr" var="luminary" rows="3"
+ <tc:sheet value="#{sheetTestController.solarArray}" id="sheet1" columns="1fr 1fr" var="luminary" rows="3"
showHeader="true" showPagingAlways="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
@@ -43,7 +43,7 @@
</tc:sheet>
<!-- rows = undefined (default 0), data model has 3 => show all = 3 -->
- <tc:sheet value="#{sheet.solarArray3}" id="sheet2" columns="1fr 1fr" var="luminary"
+ <tc:sheet value="#{sheetTestController.solarArray3}" id="sheet2" columns="1fr 1fr" var="luminary"
showHeader="true" showPagingAlways="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
@@ -54,7 +54,7 @@
</tc:sheet>
<!-- data-model has undefined rowCount, rows=3 -->
- <tc:sheet value="#{sheet.undefined}" id="sheet3" columns="1fr 1fr" var="luminary" rows="3"
+ <tc:sheet value="#{sheetTestController.undefined}" id="sheet3" columns="1fr 1fr" var="luminary" rows="3"
showHeader="true" showPagingAlways="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
@@ -65,7 +65,7 @@
</tc:sheet>
<!-- data-model has undefined rowCount, rows = undefined -->
- <tc:sheet value="#{sheet.undefined}" id="sheet4" columns="1fr 1fr" var="luminary"
+ <tc:sheet value="#{sheetTestController.undefined}" id="sheet4" columns="1fr 1fr" var="luminary"
showHeader="true" showPagingAlways="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-width.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-width.xhtml
index 1b59220..41a836f 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-width.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-auto-width.xhtml
@@ -31,7 +31,7 @@
<tc:gridLayout columns="auto" rows="auto"/>
</f:facet>
- <tc:sheet value="#{sheet.solarArray}" id="sheet1" columns="1fr 1fr" var="luminary" rows="3"
+ <tc:sheet value="#{sheetTestController.solarArray}" id="sheet1" columns="1fr 1fr" var="luminary" rows="3"
showHeader="true" showPagingAlways="true">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-bug-tobago-1090.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-bug-tobago-1090.xhtml
index c2ce6a1..3b7fb1f 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-bug-tobago-1090.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-bug-tobago-1090.xhtml
@@ -42,7 +42,7 @@
<li>Check: 2nd row (Saturn) must be selected</li>
</ol>"/>
- <tc:sheet value="#{sheet.solarArray}" id="sheet" columns="1fr 1fr" var="luminary" rows="5" selectable="single">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="sheet" columns="1fr 1fr" var="luminary" rows="5" selectable="single">
<tc:column label="Name" sortable="true">
<tc:out value="#{luminary.name}" id="name"/>
</tc:column>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-large.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-large.xhtml
index 981d1d7..a280bdb 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-large.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-large.xhtml
@@ -28,7 +28,7 @@
<tc:gridLayout rows="1fr auto"/>
</f:facet>
- <tc:sheet value="#{sheet.localeList}" id="sheet" columns="auto 5fr 5fr 5fr 1fr" var="entry" rows="1000">
+ <tc:sheet value="#{sheetTestController.localeList}" id="sheet" columns="auto 5fr 5fr 5fr 1fr" var="entry" rows="1000">
<tc:columnSelector disabled="#{entry.disabled}"/>
<tc:column label="Locale" id="l" sortable="true">
<tc:out value="#{entry.locale}"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-multi-header.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-multi-header.xhtml
index 8982e05..49206fe 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-multi-header.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-multi-header.xhtml
@@ -50,8 +50,8 @@
<tc:messages />
- <tc:sheet value="#{sheet.solarArray}" id="sheet" columns="1fr 1fr 1fr 1fr" var="luminary" showRoot="true"
- showRowRange="left" rows="5">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="sheet" columns="1fr 1fr 1fr 1fr" var="luminary" showRoot="true"
+ showRowRange="left" rows="5">
<f:facet name="header">
<tc:panel>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-1.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-1.xhtml
index 95382d8..e6ea1cb 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-1.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-1.xhtml
@@ -24,7 +24,7 @@
<tc:page id="page">
<!-- <tc:gridLayoutConstraint width="600px" height="600px"/> -->
- <tc:sheet value="#{sheet.solarArray}" id="s3" columns="1fr 1fr" var="luminary" rows="1">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="s3" columns="1fr 1fr" var="luminary" rows="1">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
</tc:column>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-11.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-11.xhtml
index f75d5ec..2155e23 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-11.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-11.xhtml
@@ -27,7 +27,7 @@
<tc:gridLayout rows="100px"/>
</f:facet>
- <tc:sheet value="#{sheet.solarArray}" id="s2" columns="1fr 1fr" var="luminary" rows="11">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="s2" columns="1fr 1fr" var="luminary" rows="11">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
</tc:column>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-20.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-20.xhtml
index 1c99b2d..2ca48a7 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-20.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-paging-20.xhtml
@@ -24,7 +24,7 @@
<tc:page id="page">
<!-- <tc:gridLayoutConstraint width="600px" height="600px"/> -->
- <tc:sheet value="#{sheet.solarArray}" id="s1" columns="1fr 1fr" var="luminary" rows="20">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="s1" columns="1fr 1fr" var="luminary" rows="20">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
</tc:column>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-reload.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-reload.xhtml
index 40945c6..df742ce 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-reload.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-reload.xhtml
@@ -34,7 +34,7 @@
<tc:out value="After 3 seconds there must only a 304 (not modified) reload, so we expect 0 as value."/>
<tc:out value="After 5 seconds there must be a normal reload, so we expect 2 as value."/>
- <tc:sheet value="#{sheet.solarArray}" id="sheet" columns="1fr 1fr" var="luminary" rows="5">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="sheet" columns="1fr 1fr" var="luminary" rows="5">
<f:facet name="reload">
<tc:reload frequency="2000" update="#{reload.onlyEven}" />
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-selector.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-selector.xhtml
index e9a58aa..e1c7bba 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-selector.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-selector.xhtml
@@ -62,7 +62,7 @@
</tc:flowLayout>
- <tc:sheet value="#{sheet.solarArray}" id="sheet" columns="auto 1fr 1fr" var="luminary" rows="20">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="sheet" columns="auto 1fr 1fr" var="luminary" rows="20">
<tc:columnSelector disabled="#{luminary.orbit == 'Sun'}"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-simple.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-simple.xhtml
index 0e810d7..170abe7 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-simple.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-simple.xhtml
@@ -25,7 +25,7 @@
<tc:page id="page">
<!-- <tc:gridLayoutConstraint width="600px" height="600px"/> -->
- <tc:sheet value="#{sheet.solarArray}" id="sheet" columns="1fr 1fr" var="luminary" rows="5">
+ <tc:sheet value="#{sheetTestController.solarArray}" id="sheet" columns="1fr 1fr" var="luminary" rows="5">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
</tc:column>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-unknown-row-count.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-unknown-row-count.xhtml
index d09d0ba..c7d9a0f 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-unknown-row-count.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/sheet/sheet-unknown-row-count.xhtml
@@ -28,7 +28,7 @@
<tc:gridLayout rows="600px"/>
</f:facet>
- <tc:sheet value="#{sheet.undefined}" id="sheet" columns="1fr 1fr" var="luminary" rows="20">
+ <tc:sheet value="#{sheetTestController.undefined}" id="sheet" columns="1fr 1fr" var="luminary" rows="20">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
</tc:column>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml
index c184d28..073ca8d 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml
@@ -58,6 +58,13 @@
<tc:selectBooleanCheckbox value="#{version.myfaces}" readonly="true" label="MyFaces"/>
</tc:segmentLayout>
+ <tc:segmentLayout medium="6seg 6seg" large="4seg 4seg 4seg" extraLarge="3seg 3seg 3seg">
+ <tc:selectBooleanCheckbox value="#{facesContext.isProjectStage('Production')}" readonly="true" label="Production"/>
+ <tc:selectBooleanCheckbox value="#{facesContext.isProjectStage('Development')}" readonly="true" label="Development"/>
+ <tc:selectBooleanCheckbox value="#{facesContext.isProjectStage('SystemTest')}" readonly="true" label="SystemTest"/>
+ <tc:selectBooleanCheckbox value="#{facesContext.isProjectStage('UnitTest')}" readonly="true" label="UnitTest"/>
+ </tc:segmentLayout>
+
</tc:section>
<tc:section label="System Properties">
--
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.