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/11/28 21:22:19 UTC

svn commit: r1771817 - in /myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main: java/org/apache/myfaces/tobago/example/blank/Hello.java webapp/helloWorld.xhtml

Author: lofwyr
Date: Mon Nov 28 21:22:19 2016
New Revision: 1771817

URL: http://svn.apache.org/viewvc?rev=1771817&view=rev
Log:
real action

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java
    myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java?rev=1771817&r1=1771816&r2=1771817&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/java/org/apache/myfaces/tobago/example/blank/Hello.java Mon Nov 28 21:22:19 2016
@@ -22,12 +22,21 @@ package org.apache.myfaces.tobago.exampl
 import javax.faces.bean.ManagedBean;
 import javax.faces.bean.RequestScoped;
 
+import static org.apache.myfaces.tobago.internal.util.Deprecation.LOG;
+
 @ManagedBean
 @RequestScoped
 public class Hello {
 
   private String name;
 
+  public String sayHello() {
+    if (LOG.isInfoEnabled()) {
+      LOG.info("Action was called, name is '{}'", name);
+    }
+    return null;
+  }
+
   public String getName() {
     return name;
   }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml?rev=1771817&r1=1771816&r2=1771817&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-blank/src/main/webapp/helloWorld.xhtml Mon Nov 28 21:22:19 2016
@@ -24,11 +24,11 @@
 
     <tc:in label="Name" value="#{hello.name}">
       <f:facet name="after">
-        <tc:button label="Submit" defaultCommand="true"/>
+        <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:out value="Hello, #{hello.name}!" rendered="#{not empty hello.name}"/>
 
   </tc:page>
 </f:view>