You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2017/02/09 13:43:44 UTC
svn commit: r1782330 -
/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/
Author: tandraschko
Date: Thu Feb 9 13:43:44 2017
New Revision: 1782330
URL: http://svn.apache.org/viewvc?rev=1782330&view=rev
Log:
MYFACES-4088 Add constructor with facesContext to event classes
Modified:
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ComponentSystemEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ExceptionQueuedEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostAddToViewEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructApplicationEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructCustomScopeEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructViewMapEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostKeepFlashValueEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostPutFlashValueEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostRestoreStateEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostValidateEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreClearFlashEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyApplicationEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyCustomScopeEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyViewMapEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFlashValueEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFromViewEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderComponentEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderViewEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreValidateEvent.java
myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/SystemEvent.java
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ComponentSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ComponentSystemEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ComponentSystemEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ComponentSystemEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
/**
*
@@ -30,6 +31,11 @@ public abstract class ComponentSystemEve
{
super(component);
}
+
+ public ComponentSystemEvent(FacesContext facesContext, UIComponent component)
+ {
+ super(facesContext, component);
+ }
public UIComponent getComponent()
{
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ExceptionQueuedEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ExceptionQueuedEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ExceptionQueuedEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/ExceptionQueuedEvent.java Thu Feb 9 13:43:44 2017
@@ -18,6 +18,8 @@
*/
package javax.faces.event;
+import javax.faces.context.FacesContext;
+
/**
* @since 2.0
*/
@@ -27,6 +29,14 @@ public class ExceptionQueuedEvent extend
{
super(eventContext);
}
+
+ /**
+ * @since 2.3
+ */
+ public ExceptionQueuedEvent(FacesContext facesContext, ExceptionQueuedEventContext eventContext)
+ {
+ super(facesContext, eventContext);
+ }
public ExceptionQueuedEventContext getContext()
{
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostAddToViewEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostAddToViewEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostAddToViewEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostAddToViewEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,6 +33,14 @@ public class PostAddToViewEvent extends
{
super(component);
}
+
+ /**
+ * @since 2.3
+ */
+ public PostAddToViewEvent(FacesContext facesContext, UIComponent component)
+ {
+ super(facesContext, component);
+ }
/**
* {@inheritDoc}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructApplicationEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructApplicationEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructApplicationEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructApplicationEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.application.Application;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -34,6 +35,14 @@ public class PostConstructApplicationEve
}
/**
+ * @since 2.3
+ */
+ public PostConstructApplicationEvent(FacesContext facesContext, Application application)
+ {
+ super(facesContext, application);
+ }
+
+ /**
* @return the application object tied to this event
*/
public Application getApplication()
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructCustomScopeEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructCustomScopeEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructCustomScopeEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructCustomScopeEvent.java Thu Feb 9 13:43:44 2017
@@ -18,6 +18,8 @@
*/
package javax.faces.event;
+import javax.faces.context.FacesContext;
+
/**
* A system event which is dispatched after the construction
* of a custom scope
@@ -33,6 +35,14 @@ public class PostConstructCustomScopeEve
}
/**
+ * @since 2.3
+ */
+ public PostConstructCustomScopeEvent(FacesContext facesContext, ScopeContext source)
+ {
+ super(facesContext, source);
+ }
+
+ /**
* @return the source as scope context representation for this event
*/
public ScopeContext getContext()
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructViewMapEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructViewMapEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructViewMapEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostConstructViewMapEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,4 +33,12 @@ public class PostConstructViewMapEvent e
{
super(root);
}
+
+ /**
+ * @since 2.3
+ */
+ public PostConstructViewMapEvent(FacesContext facesContext, UIViewRoot root)
+ {
+ super(facesContext, root);
+ }
}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostKeepFlashValueEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostKeepFlashValueEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostKeepFlashValueEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostKeepFlashValueEvent.java Thu Feb 9 13:43:44 2017
@@ -18,6 +18,7 @@
*/
package javax.faces.event;
+import javax.faces.context.FacesContext;
import javax.faces.context.Flash;
public class PostKeepFlashValueEvent extends SystemEvent
@@ -28,6 +29,14 @@ public class PostKeepFlashValueEvent ext
super(key == null ? Flash.NULL_VALUE : key);
}
+ /**
+ * @since 2.3
+ */
+ public PostKeepFlashValueEvent(FacesContext facesContext, String key)
+ {
+ super(facesContext, key == null ? Flash.NULL_VALUE : key);
+ }
+
public String getKey()
{
return getSource().toString();
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostPutFlashValueEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostPutFlashValueEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostPutFlashValueEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostPutFlashValueEvent.java Thu Feb 9 13:43:44 2017
@@ -18,6 +18,7 @@
*/
package javax.faces.event;
+import javax.faces.context.FacesContext;
import javax.faces.context.Flash;
public class PostPutFlashValueEvent extends SystemEvent
@@ -28,6 +29,14 @@ public class PostPutFlashValueEvent exte
super(key == null ? Flash.NULL_VALUE : key);
}
+ /**
+ * @since 2.3
+ */
+ public PostPutFlashValueEvent(FacesContext facesContext, String key)
+ {
+ super(facesContext, key == null ? Flash.NULL_VALUE : key);
+ }
+
public String getKey()
{
return getSource().toString();
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostRestoreStateEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostRestoreStateEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostRestoreStateEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostRestoreStateEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,6 +33,14 @@ public class PostRestoreStateEvent exten
{
super(component);
}
+
+ /**
+ * @since 2.3
+ */
+ public PostRestoreStateEvent(FacesContext facesContext, UIComponent component)
+ {
+ super(component);
+ }
public void setComponent(UIComponent newComponent)
{
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostValidateEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostValidateEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostValidateEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PostValidateEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,4 +33,12 @@ public class PostValidateEvent extends C
{
super(component);
}
+
+ /**
+ * @since 2.3
+ */
+ public PostValidateEvent(FacesContext facesContext, UIComponent component)
+ {
+ super(component);
+ }
}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreClearFlashEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreClearFlashEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreClearFlashEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreClearFlashEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import java.util.Map;
+import javax.faces.context.FacesContext;
public class PreClearFlashEvent extends SystemEvent
{
@@ -28,4 +29,11 @@ public class PreClearFlashEvent extends
super(source);
}
+ /**
+ * @since 2.3
+ */
+ public PreClearFlashEvent(FacesContext facesContext, Map<String,Object> source)
+ {
+ super(facesContext, source);
+ }
}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyApplicationEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyApplicationEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyApplicationEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyApplicationEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.application.Application;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -34,6 +35,14 @@ public class PreDestroyApplicationEvent
}
/**
+ * @since 2.3
+ */
+ public PreDestroyApplicationEvent(FacesContext facesContext, Application application)
+ {
+ super(facesContext, application);
+ }
+
+ /**
* @return the application object tied to this event
*/
public Application getApplication()
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyCustomScopeEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyCustomScopeEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyCustomScopeEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyCustomScopeEvent.java Thu Feb 9 13:43:44 2017
@@ -18,6 +18,8 @@
*/
package javax.faces.event;
+import javax.faces.context.FacesContext;
+
/**
* A system event which is dispathed prior to the destruction of a custom scope
*/
@@ -31,6 +33,14 @@ public class PreDestroyCustomScopeEvent
}
/**
+ * @since 2.3
+ */
+ public PreDestroyCustomScopeEvent(FacesContext facesContext, ScopeContext source)
+ {
+ super(facesContext, source);
+ }
+
+ /**
* @return the source as scope context representation for this event
*/
public ScopeContext getContext()
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyViewMapEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyViewMapEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyViewMapEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreDestroyViewMapEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,4 +33,12 @@ public class PreDestroyViewMapEvent exte
{
super(root);
}
+
+ /**
+ * @since 2.3
+ */
+ public PreDestroyViewMapEvent(FacesContext facesContext, UIViewRoot root)
+ {
+ super(facesContext, root);
+ }
}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFlashValueEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFlashValueEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFlashValueEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFlashValueEvent.java Thu Feb 9 13:43:44 2017
@@ -18,6 +18,7 @@
*/
package javax.faces.event;
+import javax.faces.context.FacesContext;
import javax.faces.context.Flash;
public class PreRemoveFlashValueEvent extends SystemEvent
@@ -28,6 +29,14 @@ public class PreRemoveFlashValueEvent ex
super(key == null ? Flash.NULL_VALUE : key);
}
+ /**
+ * @since 2.3
+ */
+ public PreRemoveFlashValueEvent(FacesContext facesContext, String key)
+ {
+ super(facesContext, key == null ? Flash.NULL_VALUE : key);
+ }
+
public String getKey()
{
return getSource().toString();
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFromViewEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFromViewEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFromViewEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRemoveFromViewEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -34,6 +35,14 @@ public class PreRemoveFromViewEvent exte
}
/**
+ * @since 2.3
+ */
+ public PreRemoveFromViewEvent(FacesContext facesContext, UIComponent component)
+ {
+ super(facesContext, component);
+ }
+
+ /**
* {@inheritDoc}
*/
@Override
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderComponentEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderComponentEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderComponentEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderComponentEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,4 +33,12 @@ public class PreRenderComponentEvent ext
{
super(component);
}
+
+ /**
+ * @since 2.3
+ */
+ public PreRenderComponentEvent(FacesContext facesContext, UIComponent component)
+ {
+ super(facesContext, component);
+ }
}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderViewEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderViewEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderViewEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreRenderViewEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,4 +33,12 @@ public class PreRenderViewEvent extends
{
super(root);
}
+
+ /**
+ * @since 2.3
+ */
+ public PreRenderViewEvent(FacesContext facesContext, UIViewRoot root)
+ {
+ super(facesContext, root);
+ }
}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreValidateEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreValidateEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreValidateEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/PreValidateEvent.java Thu Feb 9 13:43:44 2017
@@ -19,6 +19,7 @@
package javax.faces.event;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
@@ -32,4 +33,12 @@ public class PreValidateEvent extends Co
{
super(component);
}
+
+ /**
+ * @since 2.3
+ */
+ public PreValidateEvent(FacesContext facesContext, UIComponent component)
+ {
+ super(facesContext, component);
+ }
}
Modified: myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/SystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/SystemEvent.java?rev=1782330&r1=1782329&r2=1782330&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/SystemEvent.java (original)
+++ myfaces/core/branches/2.3.x/api/src/main/java/javax/faces/event/SystemEvent.java Thu Feb 9 13:43:44 2017
@@ -19,16 +19,25 @@
package javax.faces.event;
import java.util.EventObject;
+import javax.faces.context.FacesContext;
/**
* @since 2.0
*/
public abstract class SystemEvent extends EventObject
{
+ private transient FacesContext facesContext;
+
public SystemEvent(Object source)
{
super(source);
}
+
+ public SystemEvent(FacesContext facesContext, Object source)
+ {
+ super(source);
+ this.facesContext = facesContext;
+ }
public boolean isAppropriateListener(FacesListener listener)
{
@@ -39,4 +48,16 @@ public abstract class SystemEvent extend
{
((SystemEventListener) listener).processEvent(this);
}
+
+ /**
+ * @since 2.3
+ */
+ public FacesContext getFacesContext()
+ {
+ if (facesContext == null)
+ {
+ facesContext = FacesContext.getCurrentInstance();
+ }
+ return facesContext;
+ }
}