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/11/22 10:18:14 UTC

[myfaces-tobago] 01/03: clean up 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 cc2a7ab6b4f43a2100b53acc7120321e2a7d0895
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Nov 22 11:10:41 2018 +0100

    clean up demo
---
 .../example/test/ResourceBeanController.java       | 83 ----------------------
 .../90000-attic/resource/Resource_Manager.xhtml    | 47 ------------
 .../40-test/90000-attic/resource/Tobago_694.xhtml  | 44 ------------
 3 files changed, 174 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/ResourceBeanController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/ResourceBeanController.java
deleted file mode 100644
index 0a46ba5..0000000
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/ResourceBeanController.java
+++ /dev/null
@@ -1,83 +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 javax.enterprise.context.RequestScoped;
-import javax.faces.context.FacesContext;
-import javax.inject.Named;
-import java.util.Arrays;
-import java.util.List;
-
-@RequestScoped
-@Named
-public class ResourceBeanController {
-
-  private List<ResourceEntry> resources;
-  private int fails;
-
-  public ResourceBeanController() {
-    if (resources == null) {
-      final FacesContext facesContext = FacesContext.getCurrentInstance();
-
-      resources = Arrays.asList(
-          new ResourceEntry(
-              "data/sun-behind-mountains.jpg",
-              ResourceType.IMAGE,
-              "comes from WAR: META-INF/resources"),
-          new ResourceEntry(
-              "non-existing.jpg",
-              ResourceType.IMAGE,
-              "should fail"),
-          new ResourceEntry(
-              "image/date.png",
-              ResourceType.IMAGE,
-              "comes from JAR (tobago-theme-speyside)"),
-          new ResourceEntry(
-              "image/wait/cat.jpg",
-              ResourceType.IMAGE,
-              "comes from the WAR directly"),
-          new ResourceEntry(
-              "tobago",
-              "configTheme",
-              ResourceType.PROPERTY,
-              "comes from the theme (tobago-theme-scarborough)"),
-          new ResourceEntry(
-              "tobago",
-              "not-existing",
-              ResourceType.PROPERTY,
-              "should fail")
-      );
-
-      for (final ResourceEntry resource : resources) {
-        if (!resource.check(facesContext)) {
-          fails++;
-        }
-      }
-    }
-  }
-
-  public List<ResourceEntry> getResultList() {
-    return resources;
-  }
-
-  public int getFails() {
-    return fails;
-  }
-}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/resource/Resource_Manager.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/resource/Resource_Manager.xhtml
deleted file mode 100644
index 2879459..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/resource/Resource_Manager.xhtml
+++ /dev/null
@@ -1,47 +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>
-
-    <tc:in label="Fails" markup="#{resourceBeanController.fails == 2 ? '' : 'error' }"
-           value="#{resourceBeanController.fails}" tip="expected are 2"/>
-
-    <tc:messages/>
-
-    <tc:sheet columns="3fr 1fr 1fr 3fr" value="#{resourceBeanController.resultList}" var="item">
-      <tc:column label="Name">
-        <tc:out value="#{item.name}"/>
-      </tc:column>
-      <tc:column label="Type">
-        <tc:out value="#{item.type}"/>
-      </tc:column>
-      <tc:column label="Valid">
-        <tc:out value="#{item.valid}"/>
-      </tc:column>
-      <tc:column label="Comment">
-        <tc:out value="#{item.comment}"/>
-      </tc:column>
-    </tc:sheet>
-
-  </tc:page>
-</f:view>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/resource/Tobago_694.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/resource/Tobago_694.xhtml
deleted file mode 100644
index 3e7b3d3..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/90000-attic/resource/Tobago_694.xhtml
+++ /dev/null
@@ -1,44 +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:ui="http://java.sun.com/jsf/facelets"
-    xmlns:f="http://java.sun.com/jsf/core">
-
-  <tc:page>
-    <f:facet name="layout">
-      <tc:gridLayout rows="auto auto auto auto 1fr" columns="auto"/>
-    </f:facet>
-    <!-- <tc:gridLayoutConstraint width="600px" height="300px"/> -->
-
-    <tc:messages/>
-
-    <tc:image value="image/wait/cat.jpg">
-      <!-- <tc:gridLayoutConstraint width="100px" height="106px"/> -->
-    </tc:image>
-
-    <tc:in label="Counter:" value="#{reload.counter}" readonly="true"/>
-
-    <tc:button label="submit" action="#{reload.isReload}"/>
-
-    <tc:panel/>
-
-  </tc:page>
-</f:view>