deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject git commit: DELTASPIKE-710 added testcase to playground
Date Sat, 13 Sep 2014 17:40:31 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master dbc307eaf -> 90be5430d


DELTASPIKE-710 added testcase to playground

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/90be5430
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/90be5430
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/90be5430

Branch: refs/heads/master
Commit: 90be5430d61bf28bc42459f1ccedd9bd38518182
Parents: dbc307e
Author: tandraschko <tandraschko@apache.org>
Authored: Sat Sep 13 19:40:22 2014 +0200
Committer: tandraschko <tandraschko@apache.org>
Committed: Sat Sep 13 19:40:22 2014 +0200

----------------------------------------------------------------------
 .../windowhandling/ViewActionController.java        | 16 +++++++++++++++-
 .../views/windowhandling/clientwindow/test.xhtml    |  6 ++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/90be5430/deltaspike/examples/jsf-playground/src/main/java/org/apache/deltaspike/playground/windowhandling/ViewActionController.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jsf-playground/src/main/java/org/apache/deltaspike/playground/windowhandling/ViewActionController.java
b/deltaspike/examples/jsf-playground/src/main/java/org/apache/deltaspike/playground/windowhandling/ViewActionController.java
index b2e7fe8..8471029 100644
--- a/deltaspike/examples/jsf-playground/src/main/java/org/apache/deltaspike/playground/windowhandling/ViewActionController.java
+++ b/deltaspike/examples/jsf-playground/src/main/java/org/apache/deltaspike/playground/windowhandling/ViewActionController.java
@@ -18,6 +18,7 @@
  */
 package org.apache.deltaspike.playground.windowhandling;
 
+import java.util.Date;
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.RequestScoped;
 import javax.faces.context.FacesContext;
@@ -29,9 +30,10 @@ import org.apache.deltaspike.jsf.spi.scope.window.ClientWindow;
 @RequestScoped
 public class ViewActionController
 {
-
     @Inject
     private ClientWindow clientWindow;
+    
+    private Date lastTimeLinkAction;
 
     @PostConstruct
     public void init()
@@ -44,4 +46,16 @@ public class ViewActionController
         FacesContext context = FacesContext.getCurrentInstance();
         System.out.println("ViewActionController#action with windowId: " + clientWindow.getWindowId(context));
     }
+
+    public Date getLastTimeLinkAction()
+    {
+        return lastTimeLinkAction;
+    }
+
+    public void linkAction()
+    {
+        FacesContext context = FacesContext.getCurrentInstance();
+        System.out.println("ViewActionController#linkAction with windowId: " + clientWindow.getWindowId(context));
+        lastTimeLinkAction = new Date();
+    }
 }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/90be5430/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/clientwindow/test.xhtml
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/clientwindow/test.xhtml
b/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/clientwindow/test.xhtml
index a5be025..52df305 100644
--- a/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/clientwindow/test.xhtml
+++ b/deltaspike/examples/jsf-playground/src/main/webapp/views/windowhandling/clientwindow/test.xhtml
@@ -54,6 +54,12 @@
         <h:commandLink value="AJAX Postback with outcome" action="test.xhtml?faces-redirect=true">
             <f:ajax render="@form" execute="@this" />
         </h:commandLink>
+        <br />
+        <br />
+        Last time linkAction: #{viewActionController.lastTimeLinkAction} <br/>
+        <h:commandLink value="AJAX action" action="#{viewActionController.linkAction}">
+            <f:ajax render="@form" execute="@this" />
+        </h:commandLink>
     </h:form>
     
 </h:body>


Mime
View raw message