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/03/11 09:29:54 UTC

svn commit: r1734507 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main: java/org/apache/myfaces/tobago/example/demo/In.java webapp/content/01-basic/00/input.xhtml

Author: lofwyr
Date: Fri Mar 11 08:29:54 2016
New Revision: 1734507

URL: http://svn.apache.org/viewvc?rev=1734507&view=rev
Log:
demo

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/In.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/00/input.xhtml

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/In.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/In.java?rev=1734507&r1=1734506&r2=1734507&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/In.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/In.java Fri Mar 11 08:29:54 2016
@@ -19,15 +19,25 @@
 
 package org.apache.myfaces.tobago.example.demo;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import javax.enterprise.context.RequestScoped;
+import javax.faces.event.AjaxBehaviorEvent;
 import javax.inject.Named;
 
 @RequestScoped
 @Named
 public class In {
 
+  private static final Logger LOG = LoggerFactory.getLogger(In.class);
+
   private String changeValue;
 
+  public void update(AjaxBehaviorEvent event) {
+    LOG.info("AjaxBehaviorEvent called. Current value: '{}'", changeValue);
+  }
+
   public String getChangeValue() {
     return changeValue;
   }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/00/input.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/00/input.xhtml?rev=1734507&r1=1734506&r2=1734507&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/00/input.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/00/input.xhtml Fri Mar 11 08:29:54 2016
@@ -39,11 +39,13 @@
 
     <tc:in id="i5" value="Some Text without Label"/>
 
+    <tc:out value="FIXME: AJAX example currently not working correctly: In.setChangeValue() will not be called."/>
+
     <tc:in id="i6" value="#{in.changeValue}" label="on change">
-      <f:ajax render="o" />
+      <f:ajax render="panel" listener="#{in.update}"/>
     </tc:in>
 
-    <tc:out id="o" value="#{in.changeValue}" label="on server"/>
+    <tc:out id="o" value="#{in.changeValue}" label="value on server"/>
 
     <tc:in id="i7" label="Input (focus)" focus="true" value="Some Text"/>