myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mconc...@apache.org
Subject svn commit: r812681 - in /myfaces/core/trunk: api/src/main/java/javax/faces/component/UIComponent.java impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
Date Tue, 08 Sep 2009 20:39:55 GMT
Author: mconcini
Date: Tue Sep  8 20:39:54 2009
New Revision: 812681

URL: http://svn.apache.org/viewvc?rev=812681&view=rev
Log:
MYFACES-2334

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java?rev=812681&r1=812680&r2=812681&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java Tue Sep  8
20:39:54 2009
@@ -921,11 +921,18 @@
         }
     }
 
-    private class EventListenerWrapper implements SystemEventListener {
+    private class EventListenerWrapper implements SystemEventListener, StateHolder {
 
         private UIComponent component;
         private ComponentSystemEventListener listener;
-
+        private boolean transientObject = false;
+        
+        public EventListenerWrapper()
+        {
+            //need a no-arg constructor for state saving purposes
+            super();
+        }
+        
         public EventListenerWrapper(UIComponent component, ComponentSystemEventListener listener)
{
             assert component != null;
             assert listener != null;
@@ -966,5 +973,33 @@
 
             listener.processEvent((ComponentSystemEvent) event);
         }
+        
+        @Override
+        public boolean isTransient() {
+            return transientObject;
+        }
+
+        @Override
+        public void restoreState(FacesContext context, Object state) 
+        {
+            Object[] values = (Object[]) state;
+            component = (UIComponent) values[0];
+            listener = (ComponentSystemEventListener) values[1];
+        }
+
+        @Override
+        public Object saveState(FacesContext context) 
+        {
+            Object[] state = new Object[2];
+            state[0] = component;
+            state[1] = listener;
+            return state;   
+        }
+         
+        @Override
+        public void setTransient(boolean transientObject) 
+        {   
+            this.transientObject = transientObject;
+        }
     }
 }
\ No newline at end of file

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java?rev=812681&r1=812680&r2=812681&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
Tue Sep  8 20:39:54 2009
@@ -236,8 +236,10 @@
         {
             archives = webArchives(_externalContext);
 
-            System.out.println("Receiving " + archives.size()
-                    + " jar files to check");
+            if (log.isTraceEnabled())
+            {
+                log.trace("Receiving " + archives.size() + " jar files to check");
+            }
             for (JarFile archive : archives)
             {
                 classes = archiveClasses(_externalContext, archive);
@@ -567,13 +569,15 @@
         ClassLoader loader = getClassLoader();
 
         Set<String> paths = externalContext.getResourcePaths(prefix);
+        if(paths == null)
+        {
+            return; //need this in case there is no WEB-INF/classes directory
+        }
         if (log.isTraceEnabled())
         {
             log.trace("webClasses(" + prefix + ") - Received " + paths.size()
                     + " paths to check");
         }
-        System.out.println("webClasses(" + prefix + ") - Received "
-                + paths.size() + " paths to check");
 
         String path = null;
 



Mime
View raw message