You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ml...@apache.org on 2013/08/03 14:08:50 UTC

[03/10] git commit: TAP5-2070 have the component model be able to declare if it handle the activation context

TAP5-2070 have the component model be able to declare if it handle the activation context


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/5cc984b2
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/5cc984b2
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/5cc984b2

Branch: refs/heads/master
Commit: 5cc984b2c826e619d1dcdb52704bdffca263a97e
Parents: 8fecc8e
Author: Massimo Lusetti <ml...@apache.org>
Authored: Sat Aug 3 13:54:24 2013 +0200
Committer: Massimo Lusetti <ml...@apache.org>
Committed: Sat Aug 3 13:54:24 2013 +0200

----------------------------------------------------------------------
 .../internal/model/MutableComponentModelImpl.java    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/5cc984b2/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java
index 12691f4..a78366d 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java
@@ -69,6 +69,8 @@ public final class MutableComponentModelImpl implements MutableComponentModel
 
     private final String libraryName;
 
+	private boolean handleActivationEventContext;
+
     public MutableComponentModelImpl(String componentClassName, Logger logger, Resource baseResource,
                                      ComponentModel parentModel, boolean pageClass, String libraryName)
     {
@@ -79,6 +81,9 @@ public final class MutableComponentModelImpl implements MutableComponentModel
         this.pageClass = pageClass;
         this.libraryName = libraryName;
 
+		// Default to false, explicitly set during page transformation
+		this.handleActivationEventContext = false;
+
         // Pre-allocate names from the parent, to avoid name collisions.
 
         if (this.parentModel != null)
@@ -394,4 +399,14 @@ public final class MutableComponentModelImpl implements MutableComponentModel
     {
         return pageClass;
     }
+
+	public void doHandleActivationEventContext()
+	{
+		this.handleActivationEventContext = true;
+	}
+
+	public boolean handleActivationEventContext()
+	{
+		return this.handleActivationEventContext;
+	}
 }