Return-Path: X-Original-To: apmail-deltaspike-commits-archive@www.apache.org Delivered-To: apmail-deltaspike-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FBE211FDE for ; Sat, 13 Sep 2014 17:40:32 +0000 (UTC) Received: (qmail 43750 invoked by uid 500); 13 Sep 2014 17:40:32 -0000 Delivered-To: apmail-deltaspike-commits-archive@deltaspike.apache.org Received: (qmail 43712 invoked by uid 500); 13 Sep 2014 17:40:32 -0000 Mailing-List: contact commits-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltaspike.apache.org Delivered-To: mailing list commits@deltaspike.apache.org Received: (qmail 43703 invoked by uid 99); 13 Sep 2014 17:40:32 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Sep 2014 17:40:32 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 081809C168D; Sat, 13 Sep 2014 17:40:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tandraschko@apache.org To: commits@deltaspike.apache.org Message-Id: <1202f406f3fe4041965b94ba6242306c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: DELTASPIKE-710 added testcase to playground Date: Sat, 13 Sep 2014 17:40:31 +0000 (UTC) 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 Authored: Sat Sep 13 19:40:22 2014 +0200 Committer: tandraschko 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 @@ +
+
+ Last time linkAction: #{viewActionController.lastTimeLinkAction}
+ + +