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/01/18 14:12:03 UTC
[myfaces-tobago] 01/02: TOBAGO-1843: Demo: Enhancements for Tobago
4.1 * drop old example
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 27339936e30de4ff1a72c6678514c7d51d50b69e
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Jan 18 14:20:06 2018 +0100
TOBAGO-1843: Demo: Enhancements for Tobago 4.1
* drop old example
---
.../example/test/PopupReferenceController.java | 110 ---------------------
.../src/main/webapp/WEB-INF/faces-config.xml | 6 --
.../40-test/90000-attic/popup/popup-in-sheet.xhtml | 109 --------------------
3 files changed, 225 deletions(-)
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/PopupReferenceController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/PopupReferenceController.java
deleted file mode 100644
index 2aaca06..0000000
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/PopupReferenceController.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.myfaces.tobago.example.test;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.myfaces.tobago.component.UISheet;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.ActionEvent;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-public class PopupReferenceController implements Serializable {
-
- private static final Logger LOG = LoggerFactory.getLogger(PopupReferenceController.class);
-
- private Entry entry;
-
- private List<Entry> sheet;
-
-
- public PopupReferenceController() {
- sheet = new ArrayList<>();
- for (int i = 0; i < 10; i++) {
- final Entry tmp = new Entry();
- tmp.setColumn1("cell__1__" + i);
- tmp.setColumn2("cell_2_" + i);
- tmp.setColumn3("cell_3_" + i);
- sheet.add(tmp);
- }
- }
-
- public void selectEntry(final ActionEvent event) {
- UIComponent component = event.getComponent();
- while (!(component instanceof UISheet)) {
- component = component.getParent();
- }
-
- final UISheet sheet = (UISheet) component;
- entry = (Entry) sheet.getRowData();
- LOG.info("entry = \"" + entry.getColumn1() + "\"");
- }
-
- public void saveChanges(final ActionEvent event) {
- LOG.info("saveChanges()");
- // nothing to do here
- }
-
-
- public List<Entry> getSheet() {
- return sheet;
- }
-
- public Entry getEntry() {
- return entry;
- }
-
- public void setEntry(final Entry entry) {
- this.entry = entry;
- }
-
- public static class Entry{
- private String column1;
- private String column2;
- private String column3;
-
- public String getColumn1() {
- return column1;
- }
-
- public void setColumn1(final String column1) {
- this.column1 = column1;
- }
-
- public String getColumn2() {
- return column2;
- }
-
- public void setColumn2(final String column2) {
- this.column2 = column2;
- }
-
- public String getColumn3() {
- return column3;
- }
-
- public void setColumn3(final String column3) {
- this.column3 = column3;
- }
- }
-}
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 b3fada8..bdc31fd 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
@@ -236,12 +236,6 @@
</managed-bean>
<managed-bean>
- <managed-bean-name>popupReference</managed-bean-name>
- <managed-bean-class>org.apache.myfaces.tobago.example.test.PopupReferenceController</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
<managed-bean-name>messages</managed-bean-name>
<managed-bean-class>org.apache.myfaces.tobago.example.test.Messages</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/popup/popup-in-sheet.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/popup/popup-in-sheet.xhtml
deleted file mode 100644
index 0eabcd5..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/popup/popup-in-sheet.xhtml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?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.
--->
-
-<!-- XXX This is an old page. Content might not be up to date. Needs to be refactored, or just deleted. -->
-<f:view
- xmlns:tc="http://myfaces.apache.org/tobago/component"
- xmlns:f="http://java.sun.com/jsf/core">
-
- <tc:page width="800px" height="300px" id="page">
- <tc:box label="Popups inside sheet">
- <f:facet name="layout">
- <tc:gridLayout rows="1fr 0px 0px"/>
- </f:facet>
-
- <tc:sheet id="sheet"
- var="entry" columns="1fr 1fr 1fr 1fr" value="#{popupReference.sheet}">
-
- <tc:column label="Column 1">
- <tc:link label="#{entry.column1}" actionListener="#{popupReference.selectEntry}">
- <f:ajax render=":page:popup1" execute=":page:popup1"/>
- <tc:popupReference for=":page:popup1"/>
- </tc:link>
- </tc:column>
-
- <tc:column label="Column 2">
- <tc:out value="#{entry.column2}"/>
- </tc:column>
-
- <tc:column label="Column 3">
- <tc:out value="#{entry.column3}"/>
- </tc:column>
-
- <tc:column label="Edit">
- <tc:button label="Edit" actionListener="#{popupReference.selectEntry}">
- <f:ajax render=":page:popup2" execute=":page:popup2"/>
- <tc:popupReference for=":page:popup2"/>
- </tc:button>
- </tc:column>
-
- </tc:sheet>
-
- <tc:popup id="popup1" width="300px" height="100px">
- <!-- the clientId of this popup is "page:sheet:popup1" -->
- <tc:box label="Popup1">
- <f:facet name="layout">
- <tc:gridLayout rows="auto 1fr auto"/>
- </f:facet>
- <tc:in label="column 1 value:" value="#{popupReference.entry.column1}"/>
- <tc:panel/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="1fr auto auto"/>
- </f:facet>
- <tc:panel/>
- <tc:button label="Save" actionListener="#{popupReference.saveChanges}">
- <f:ajax render=":page:sheet" execute=":page:sheet"/>
- <tc:attribute name="popupClose" value="afterSubmit"/>
- </tc:button>
- <tc:button label="Cancel">
- <tc:attribute name="popupClose" value="immediate"/>
- </tc:button>
- </tc:panel>
- </tc:box>
- </tc:popup>
-
- <tc:popup id="popup2" width="300px" height="150px">
- <!-- the clientId of this popup is "page:sheet:popup2" -->
- <tc:box label="Popup1">
- <f:facet name="layout">
- <tc:gridLayout rows="auto auto auto 1fr auto"/>
- </f:facet>
- <tc:in label="column 1 value:" value="#{popupReference.entry.column1}"/>
- <tc:in label="column 2 value:" value="#{popupReference.entry.column2}"/>
- <tc:in label="column 3 value:" value="#{popupReference.entry.column3}"/>
- <tc:panel/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="1fr auto auto"/>
- </f:facet>
- <tc:panel/>
- <tc:button label="Save" actionListener="#{popupReference.saveChanges}">
- <f:ajax render=":page:sheet" execute=":page:sheet"/>
- <tc:attribute name="popupClose" value="afterSubmit"/>
- </tc:button>
- <tc:button label="Cancel">
- <tc:attribute name="popupClose" value="immediate"/>
- </tc:button>
- </tc:panel>
- </tc:box>
- </tc:popup>
-
- </tc:box>
- </tc:page>
-</f:view>
--
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.