You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2010/01/04 18:16:24 UTC
svn commit: r895708 -
/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Author: arobinson74
Date: Mon Jan 4 17:16:21 2010
New Revision: 895708
URL: http://svn.apache.org/viewvc?rev=895708&view=rev
Log:
TRINIDAD-1673 provide a method that components can override in UIXComponentBase to be able to have a say if a faces event should trigger PPR targets
Modified:
myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=895708&r1=895707&r2=895708&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java Mon Jan 4 17:16:21 2010
@@ -19,11 +19,12 @@
package org.apache.myfaces.trinidad.component;
import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.ObjectOutputStream;
import java.net.URL;
+
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -63,6 +64,7 @@
import org.apache.myfaces.trinidad.render.LifecycleRenderer;
import org.apache.myfaces.trinidad.util.ThreadLocalUtils;
+
/**
* Base implementation of components for all of Trinidad. UIXComponentBase
* offers a number of features not supplied by the standard UIComponentBase
@@ -653,7 +655,7 @@
_LOG.fine("Broadcasting event " + event + " to " + this);
UIComponent component = event.getComponent();
- if (component != null)
+ if (component != null && satisfiesPartialTrigger(event))
{
RequestContext adfContext = RequestContext.getCurrentInstance();
if (adfContext != null)
@@ -678,6 +680,18 @@
}
}
+ /**
+ * Check if a faces event broadcast to this component should trigger the partial updates of the
+ * target listeners of this component. By default, all events trigger a partial update of the listeners.
+ *
+ * @param event The event to check
+ * @return true if the partial triggers should be updated by this event being broadcast
+ */
+ protected boolean satisfiesPartialTrigger(
+ FacesEvent event)
+ {
+ return true;
+ }
// ------------------------------------------- Lifecycle Processing Methods