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/04/12 12:11:47 UTC

[myfaces-tobago] 03/03: Blank-Demo: Very simple workflow, as 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 49f61f2a42c1724b7a845f61a3b755d2346bbb35
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Apr 12 14:10:40 2018 +0200

    Blank-Demo: Very simple workflow, as example.
---
 .../java/org/apache/myfaces/tobago/example/blank/Hello.java  |  2 +-
 .../tobago-example-blank/src/main/webapp/helloWorld.xhtml    |  5 +----
 .../src/main/webapp/{helloWorld.xhtml => result.xhtml}       | 12 +++---------
 3 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java b/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java
index 6e5d9b8..b39b571 100644
--- a/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java
+++ b/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java
@@ -37,7 +37,7 @@ public class Hello {
     if (LOG.isInfoEnabled()) {
       LOG.info("Action was called, name is '{}'", name);
     }
-    return null;
+    return "/result.xhtml";
   }
 
   public String getName() {
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml b/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
index 1d69ea8..c752d8e 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
+++ b/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
@@ -21,14 +21,11 @@
         xmlns:tc="http://myfaces.apache.org/tobago/component">
 
   <tc:page>
-
     <tc:in label="Name" value="#{hello.name}">
       <f:facet name="after">
         <tc:button label="Submit" defaultCommand="true" action="#{hello.sayHello}"/>
       </f:facet>
     </tc:in>
-
-    <tc:out value="Hello, #{hello.name}!" rendered="#{not empty hello.name}"/>
-
   </tc:page>
+
 </f:view>
diff --git a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml b/tobago-example/tobago-example-blank/src/main/webapp/result.xhtml
similarity index 78%
copy from tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
copy to tobago-example/tobago-example-blank/src/main/webapp/result.xhtml
index 1d69ea8..0bffc77 100644
--- a/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
+++ b/tobago-example/tobago-example-blank/src/main/webapp/result.xhtml
@@ -21,14 +21,8 @@
         xmlns:tc="http://myfaces.apache.org/tobago/component">
 
   <tc:page>
-
-    <tc:in label="Name" value="#{hello.name}">
-      <f:facet name="after">
-        <tc:button label="Submit" defaultCommand="true" action="#{hello.sayHello}"/>
-      </f:facet>
-    </tc:in>
-
-    <tc:out value="Hello, #{hello.name}!" rendered="#{not empty hello.name}"/>
-
+    <tc:link label="Back" outcome="/helloWorld.xhtml"/>
+    <tc:out value="Hello, #{hello.name}!"/>
   </tc:page>
+
 </f:view>

-- 
To stop receiving notification emails like this one, please contact
lofwyr@apache.org.