myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1406236 [1/2] - in /myfaces/core/branches/2.1.x-client-window: ./ api/ api/src/main/java/javax/faces/component/ api/src/main/java/javax/faces/context/ api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/ api/src/main/javascript/...
Date Tue, 06 Nov 2012 17:29:38 GMT
Author: lu4242
Date: Tue Nov  6 17:29:35 2012
New Revision: 1406236

URL: http://svn.apache.org/viewvc?rev=1406236&view=rev
Log:
merge latest changes (rev 1383166,1383168,1384981,1384983,1386916,1386944,1389919,1390212,1392355,1393567,1393891,1395401,1395406,1395409,1395974,1397444,1398700,1398769,1398929,1399817,1400150,1401352,1402825,1402849,1403894,1405217)

Added:
    myfaces/core/branches/2.1.x-client-window/impl/src/test/java/org/apache/myfaces/view/facelets/compiler/CompressSpacesTextUnitTestCase.java
      - copied unchanged from r1390212, myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/compiler/CompressSpacesTextUnitTestCase.java
Modified:
    myfaces/core/branches/2.1.x-client-window/   (props changed)
    myfaces/core/branches/2.1.x-client-window/api/pom.xml
    myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponent.java
    myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponentBase.java
    myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIViewParameter.java
    myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/_ComponentAttributesMap.java
    myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/PartialResponseWriter.java
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomExperimental.js
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_EvalHandlers.js
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_RuntimeQuirks.js
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_Transports.js
    myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/engine/BaseRequest.js
    myfaces/core/branches/2.1.x-client-window/impl/pom.xml
    myfaces/core/branches/2.1.x-client-window/impl/src/main/conf/META-INF/.standard-faces-config-base.xml.jsfdia
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/element/FaceletsProcessing.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FaceletsProcessing.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/CompositeComponentELResolver.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResourceBundleResolver.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompilationManager.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralNonExcapedTextInstruction.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralTextInstruction.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextUnit.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/el/ValueExpressionMethodExpression.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentBeanInfo.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentSupport.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ViewMetadataHandler.java
    myfaces/core/branches/2.1.x-client-window/impl/src/main/resources/META-INF/faces-config20.vm   (props changed)
    myfaces/core/branches/2.1.x-client-window/impl/src/main/resources/META-INF/xdoc-component.vm
    myfaces/core/branches/2.1.x-client-window/impl/src/main/resources/META-INF/xdoc-tag.vm
    myfaces/core/branches/2.1.x-client-window/impl/src/main/resources/META-INF/xdoc-web-config.vm
    myfaces/core/branches/2.1.x-client-window/impl/src/test/java/org/apache/myfaces/config/annotation/ClassByteCodeAnnotationFilterTest.java
    myfaces/core/branches/2.1.x-client-window/impl/src/test/java/org/apache/myfaces/lifecycle/RestoreViewExecutorTest.java
    myfaces/core/branches/2.1.x-client-window/impl/src/test/resources/org/apache/myfaces/lifecycle/view1.jsp
    myfaces/core/branches/2.1.x-client-window/impl/src/test/resources/org/apache/myfaces/lifecycle/view2.xhtml
    myfaces/core/branches/2.1.x-client-window/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/testSimpleThisResourceReference.xhtml
    myfaces/core/branches/2.1.x-client-window/implee6/pom.xml
    myfaces/core/branches/2.1.x-client-window/parent/pom.xml   (props changed)
    myfaces/core/branches/2.1.x-client-window/parent/src/   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared/   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/pom.xml   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/main/java/org/apache/myfaces/shared/util/AttachedDeltaWrapper.java   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/main/java/org/apache/myfaces/shared/util/ComponentUtils.java   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/main/java/org/apache/myfaces/shared/util/DebugUtils.java   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/main/java/org/apache/myfaces/shared/util/RendererUtils.java   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/main/java/org/apache/myfaces/shared/util/TagUtils.java   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/main/java/org/apache/myfaces/shared/util/renderkit/   (props changed)
    myfaces/core/branches/2.1.x-client-window/shared-public/src/test/resources/org/apache/myfaces/shared/application/view1.jsp
    myfaces/core/branches/2.1.x-client-window/shared-public/src/test/resources/org/apache/myfaces/shared/application/view2.xhtml
    myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java
    myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java
    myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRadioRendererBase.java
    myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
    myfaces/core/branches/2.1.x-client-window/shared/src/main/java/org/apache/myfaces/shared/util/MyFacesObjectInputStream.java
    myfaces/core/branches/2.1.x-client-window/shared/src/test/resources/org/apache/myfaces/shared/application/view1.jsp
    myfaces/core/branches/2.1.x-client-window/shared/src/test/resources/org/apache/myfaces/shared/application/view2.xhtml

Propchange: myfaces/core/branches/2.1.x-client-window/
------------------------------------------------------------------------------
  Merged /myfaces/core/trunk:r1383166,1383168,1384981,1384983,1386916,1386944,1389919,1390212,1392355,1393567,1393891,1395401,1395406,1395409,1395974,1397444,1398700,1398769,1398929,1399817,1400150,1401352,1402825,1402849,1403894,1405217

Modified: myfaces/core/branches/2.1.x-client-window/api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/pom.xml?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/pom.xml (original)
+++ myfaces/core/branches/2.1.x-client-window/api/pom.xml Tue Nov  6 17:29:35 2012
@@ -74,6 +74,21 @@
         
         <plugins>
 
+            <!-- license checker needs to exclude some kinds of files -->
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <!-- dojo has combined new bsd + AFL 2.1 license -->
+                        <exclude>src/main/resources/META-INF/licenses/dojo-LICENSE.TXT</exclude>
+                        
+                        <!-- facelets has non-standard APL license -->
+                        <exclude>src/main/resources/META-INF/licenses/facelets-LICENSE.txt</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+            
             <!-- compilation and compression of our javascripts -->
             <plugin>
                 <artifactId>myfaces-javascript-plugin</artifactId>

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponent.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponent.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponent.java Tue Nov  6 17:29:35 2012
@@ -445,8 +445,20 @@ public abstract class UIComponent
      */
     public static UIComponent getCurrentComponent(FacesContext context)
     {
+        Boolean honorCurrentComponentAttributes = null;
 
-        Boolean honorCurrentComponentAttributes = _getHonorCurrentComponentAttributes(context);
+        if (context.getViewRoot() != null)
+        {
+            honorCurrentComponentAttributes = ((UIComponent)context.getViewRoot())._honorCurrentComponentAttributes;
+            if (honorCurrentComponentAttributes == null)
+            {
+                honorCurrentComponentAttributes = _getHonorCurrentComponentAttributes(context);
+            }
+        }
+        else
+        {
+            honorCurrentComponentAttributes = _getHonorCurrentComponentAttributes(context);
+        }
 
         if (honorCurrentComponentAttributes == Boolean.TRUE)
         {
@@ -483,8 +495,20 @@ public abstract class UIComponent
      */
     public static UIComponent getCurrentCompositeComponent(FacesContext context)
     {
+        Boolean honorCurrentComponentAttributes = null;
 
-        Boolean honorCurrentComponentAttributes = _getHonorCurrentComponentAttributes(context);
+        if (context.getViewRoot() != null)
+        {
+            honorCurrentComponentAttributes = ((UIComponent)context.getViewRoot())._honorCurrentComponentAttributes;
+            if (honorCurrentComponentAttributes == null)
+            {
+                honorCurrentComponentAttributes = _getHonorCurrentComponentAttributes(context);
+            }
+        }
+        else
+        {
+            honorCurrentComponentAttributes = _getHonorCurrentComponentAttributes(context);
+        }
 
         if (honorCurrentComponentAttributes == Boolean.TRUE)
         {

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIComponentBase.java Tue Nov  6 17:29:35 2012
@@ -103,6 +103,8 @@ public abstract class UIComponentBase ex
     private String _rendererType;
     private String _markCreated;
     private String _facetName;
+    private boolean _addedByHandler = false;
+    private boolean _facetCreatedUIPanel = false;
 
     /**
      * This map holds ClientBehavior instances.
@@ -1940,7 +1942,7 @@ public abstract class UIComponentBase ex
         else
         {
             //Full
-            Object values[] = new Object[9];
+            Object values[] = new Object[11];
             values[0] = saveFacesListenersList(context);
             StateHelper stateHelper = getStateHelper(false);
             if (stateHelper != null)
@@ -1954,6 +1956,8 @@ public abstract class UIComponentBase ex
             values[6] = _markCreated;
             values[7] = _rendererType;
             values[8] = _isRendererTypeSet;
+            values[9] = _addedByHandler;
+            values[10] = _facetCreatedUIPanel;
 
             return values;
         }
@@ -1989,7 +1993,7 @@ public abstract class UIComponentBase ex
         
         Object values[] = (Object[]) state;
         
-        if ( values.length == 9 && initialStateMarked())
+        if ( values.length == 11 && initialStateMarked())
         {
             //Delta mode is active, but we are restoring a full state.
             //we need to clear the initial state, to restore state without
@@ -2007,7 +2011,7 @@ public abstract class UIComponentBase ex
                         ((_AttachedDeltaWrapper) values[0]).getWrappedStateObject());
             //}
         }
-        else if (values[0] != null || (values.length == 9))
+        else if (values[0] != null || (values.length == 11))
         {
             //Full
             _facesListeners = (_DeltaList<FacesListener>)
@@ -2020,13 +2024,15 @@ public abstract class UIComponentBase ex
         
         getStateHelper().restoreState(context, values[1]);
         
-        if (values.length == 9)
+        if (values.length == 11)
         {
             _id = (String) values[4];
             _clientId = (String) values[5];
             _markCreated = (String) values[6];
             _rendererType = (String) values[7];
             _isRendererTypeSet = (Boolean) values[8];
+            _addedByHandler = (Boolean) values[9];
+            _facetCreatedUIPanel = (Boolean) values[10];
         }
         else if (values.length == 5)
         {
@@ -2037,7 +2043,7 @@ public abstract class UIComponentBase ex
         // rendererType needs to be restored before SystemEventListener,
         // otherwise UIComponent.getCurrentComponent(context).getRenderer(context)
         // will not work correctly
-        if (values.length == 9)
+        if (values.length == 11)
         {
             //Full restore
             restoreFullBehaviorsMap(context, values[2]);
@@ -2432,6 +2438,26 @@ public abstract class UIComponentBase ex
         _facetName = facetName;
     }
     
+    boolean isOamVfAddedByHandler()
+    {
+        return _addedByHandler;
+    }
+    
+    void setOamVfAddedByHandler(boolean addedByHandler)
+    {
+        _addedByHandler = addedByHandler;
+    }
+    
+    boolean isOamVfFacetCreatedUIPanel()
+    {
+        return _facetCreatedUIPanel;
+    }
+    
+    void setOamVfFacetCreatedUIPanel(boolean facetCreatedUIPanel)
+    {
+        _facetCreatedUIPanel = facetCreatedUIPanel;
+    }
+
 /**
      * <p>
      * This gets a single FacesContext-local shared stringbuilder instance, each time you call

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIViewParameter.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIViewParameter.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIViewParameter.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/UIViewParameter.java Tue Nov  6 17:29:35 2012
@@ -103,7 +103,7 @@ public class UIViewParameter extends UII
 
     public String getName()
     {
-        return (String) getStateHelper().get(PropertyKeys.name);
+        return (String) getStateHelper().eval(PropertyKeys.name);
     }
 
     public String getStringValue(FacesContext context)

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/_ComponentAttributesMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/_ComponentAttributesMap.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/_ComponentAttributesMap.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/component/_ComponentAttributesMap.java Tue Nov  6 17:29:35 2012
@@ -64,6 +64,19 @@ class _ComponentAttributesMap implements
     private final static String MARK_CREATED = "oam.vf.MARK_ID";
     
     private final static String FACET_NAME_KEY = "facelets.FACET_NAME";
+    
+    public final static String FACET_CREATED_UIPANEL_MARKER = "oam.vf.createdUIPanel";
+    
+    private final static String COMPONENT_ADDED_BY_HANDLER_MARKER = "oam.vf.addedByHandler";
+    
+    public static final String PROPERTY_DESCRIPTOR_MAP_KEY = "oam.cc.beanInfo.PDM";
+    
+    /**
+     * This variable works as a check to indicate the minimun lenght we need to check
+     * for the special attributes, and save some time in get(), containsKey() and 
+     * put() operations.
+     */
+    private final static int MIN_LENGHT_CHECK = MARK_CREATED.length();
 
     // The component that is read/written via this map.
     private UIComponentBase _component;
@@ -85,6 +98,8 @@ class _ComponentAttributesMap implements
     
     private boolean _isCompositeComponent;
     private boolean _isCompositeComponentSet;
+    
+    private BeanInfo _ccBeanInfo;
 
     /**
      * Create a map backed by the specified component.
@@ -170,32 +185,45 @@ class _ComponentAttributesMap implements
         checkKey(key);
 
         int keyLength = ((String)key).length();
-        if (MARK_CREATED.length() == keyLength &&
-            MARK_CREATED.equals(key))
-        {
-            return ((UIComponentBase)_component).getOamVfMarkCreated() != null;
-        }
-        else if (FACET_NAME_KEY.length() == keyLength &&
-            FACET_NAME_KEY.equals(key))
+        if (keyLength >= MIN_LENGHT_CHECK)
         {
-            return _component.getOamVfFacetName() != null;
-        }
-        // The most common call to this method comes from UIComponent.isCompositeComponent()
-        // to reduce the impact. This is better than two lookups, once over property descriptor map
-        // and the other one from the underlying map.
-        if (Resource.COMPONENT_RESOURCE_KEY.length() == keyLength &&
-            Resource.COMPONENT_RESOURCE_KEY.equals(key))
-        {
-            if (!_isCompositeComponentSet)
+            if (MARK_CREATED.length() == keyLength &&
+                MARK_CREATED.equals(key))
+            {
+                return ((UIComponentBase)_component).getOamVfMarkCreated() != null;
+            }
+            else if (FACET_NAME_KEY.length() == keyLength &&
+                FACET_NAME_KEY.equals(key))
+            {
+                return _component.getOamVfFacetName() != null;
+            }
+            else if (COMPONENT_ADDED_BY_HANDLER_MARKER.length() == keyLength &&
+                COMPONENT_ADDED_BY_HANDLER_MARKER.equals(key))
+            {
+                return _component.isOamVfAddedByHandler();
+            }
+            else if (FACET_CREATED_UIPANEL_MARKER.length() == keyLength &&
+                FACET_CREATED_UIPANEL_MARKER.equals(key))
             {
-                // Note we are not setting _isCompositeComponentSet, because when the component tree is built
-                // using JSF 1.2 state saving, PostAddToViewEvent is propagated and the component is check 
-                // if is a composite component, but the state is not restored, so the check return always
-                // false. A check for processing events was added to prevent that scenario, but anyway that 
-                // makes invalid set _isCompositeComponentSet to true on this location.
-                _isCompositeComponent = getUnderlyingMap().containsKey(Resource.COMPONENT_RESOURCE_KEY);
+                return _component.isOamVfFacetCreatedUIPanel();
+            }
+            // The most common call to this method comes from UIComponent.isCompositeComponent()
+            // to reduce the impact. This is better than two lookups, once over property descriptor map
+            // and the other one from the underlying map.
+            if (Resource.COMPONENT_RESOURCE_KEY.length() == keyLength &&
+                Resource.COMPONENT_RESOURCE_KEY.equals(key))
+            {
+                if (!_isCompositeComponentSet)
+                {
+                    // Note we are not setting _isCompositeComponentSet, because when the component tree is built
+                    // using JSF 1.2 state saving, PostAddToViewEvent is propagated and the component is check 
+                    // if is a composite component, but the state is not restored, so the check return always
+                    // false. A check for processing events was added to prevent that scenario, but anyway that 
+                    // makes invalid set _isCompositeComponentSet to true on this location.
+                    _isCompositeComponent = getUnderlyingMap().containsKey(Resource.COMPONENT_RESOURCE_KEY);
+                }
+                return _isCompositeComponent;
             }
-            return _isCompositeComponent;
         }
         return getPropertyDescriptor((String) key) == null ? getUnderlyingMap().containsKey(key) : false;
     }
@@ -264,15 +292,28 @@ class _ComponentAttributesMap implements
         Object value;
 
         int keyLength = ((String)key).length();
-        if (MARK_CREATED.length() == keyLength &&
-            MARK_CREATED.equals(key))
+        if (keyLength >= MIN_LENGHT_CHECK)
         {
-            return _component.getOamVfMarkCreated();
-        }
-        else if (FACET_NAME_KEY.length() == keyLength &&
-            FACET_NAME_KEY.equals(key))
-        {
-            return _component.getOamVfFacetName();
+            if (MARK_CREATED.length() == keyLength &&
+                MARK_CREATED.equals(key))
+            {
+                return _component.getOamVfMarkCreated();
+            }
+            else if (FACET_NAME_KEY.length() == keyLength &&
+                FACET_NAME_KEY.equals(key))
+            {
+                return _component.getOamVfFacetName();
+            }
+            else if (COMPONENT_ADDED_BY_HANDLER_MARKER.length() == keyLength &&
+                COMPONENT_ADDED_BY_HANDLER_MARKER.equals(key))
+            {
+                return _component.isOamVfAddedByHandler();
+            }
+            else if (FACET_CREATED_UIPANEL_MARKER.length() == keyLength &&
+                FACET_CREATED_UIPANEL_MARKER.equals(key))
+            {
+                return _component.isOamVfFacetCreatedUIPanel();
+            }
         }
         // is there a javabean property to read?
         _PropertyDescriptorHolder propertyDescriptor = getPropertyDescriptor((String) key);
@@ -301,19 +342,25 @@ class _ComponentAttributesMap implements
                     }
                     if (_isCompositeComponent)
                     {
-                        BeanInfo ccBeanInfo = (BeanInfo) getUnderlyingMap().get(UIComponent.BEANINFO_KEY);
+                        BeanInfo ccBeanInfo = _ccBeanInfo != null ? _ccBeanInfo :
+                            (BeanInfo) getUnderlyingMap().get(UIComponent.BEANINFO_KEY);
                         if (ccBeanInfo != null)
                         {
-                            for (PropertyDescriptor attribute : ccBeanInfo.getPropertyDescriptors())
+                            //Fast shortcut to allow fast lookup.
+                            Map<String, PropertyDescriptor> attributeMap = (Map<String, PropertyDescriptor>) 
+                                ccBeanInfo.getBeanDescriptor().getValue(
+                                    PROPERTY_DESCRIPTOR_MAP_KEY);
+                            if (attributeMap != null)
                             {
-                                if (attribute.getName().equals(key))
+                                PropertyDescriptor attribute = attributeMap.get(key);
+                                if (attribute != null)
                                 {
                                     String attributeName = attribute.getName();
                                     boolean isKnownMethod = "action".equals(attributeName)
                                             || "actionListener".equals(attributeName)
                                             || "validator".equals(attributeName)
                                             || "valueChangeListener".equals(attributeName);
-                                    
+
                                     // <composite:attribute> method-signature attribute is 
                                     // ValueExpression that must evaluate to String
                                     ValueExpression methodSignatureExpression
@@ -322,11 +369,12 @@ class _ComponentAttributesMap implements
                                     if (methodSignatureExpression != null)
                                     {
                                         // Check if the value expression holds a method signature
-                                        // Note that it could be null, so in that case we don't have to do anything
+                                        // Note that it could be null, so in that case we don't have to 
+                                        // do anything
                                         methodSignature = (String) methodSignatureExpression.getValue(
                                                                     _component.getFacesContext().getELContext());
                                     }
-                                    
+
                                     // either the attributeName has to be a knownMethod
                                     // or there has to be a method-signature
                                     if (isKnownMethod || methodSignature != null)
@@ -337,7 +385,48 @@ class _ComponentAttributesMap implements
                                     else
                                     {
                                         value = attribute.getValue("default");
-                                        break;
+                                    }
+                                }
+                            }
+                            else
+                            {
+                                // Failsafe if another implementation for composite components is set
+                                for (PropertyDescriptor attribute : ccBeanInfo.getPropertyDescriptors())
+                                {
+                                    if (attribute.getName().equals(key))
+                                    {
+                                        String attributeName = attribute.getName();
+                                        boolean isKnownMethod = "action".equals(attributeName)
+                                                || "actionListener".equals(attributeName)
+                                                || "validator".equals(attributeName)
+                                                || "valueChangeListener".equals(attributeName);
+
+                                        // <composite:attribute> method-signature attribute is 
+                                        // ValueExpression that must evaluate to String
+                                        ValueExpression methodSignatureExpression
+                                                = (ValueExpression) attribute.getValue("method-signature");
+                                        String methodSignature = null;
+                                        if (methodSignatureExpression != null)
+                                        {
+                                            // Check if the value expression holds a method signature
+                                            // Note that it could be null, so in that case we don't have to 
+                                            // do anything
+                                            methodSignature = (String) methodSignatureExpression.getValue(
+                                                                        _component.getFacesContext().getELContext());
+                                        }
+
+                                        // either the attributeName has to be a knownMethod
+                                        // or there has to be a method-signature
+                                        if (isKnownMethod || methodSignature != null)
+                                        {
+                                            //In this case it is expecting a ValueExpression
+                                            return attribute.getValue("default");
+                                        }
+                                        else
+                                        {
+                                            value = attribute.getValue("default");
+                                            break;
+                                        }
                                     }
                                 }
                             }
@@ -372,19 +461,41 @@ class _ComponentAttributesMap implements
     {
         checkKey(key);
         int keyLength = ((String)key).length();
-        if (MARK_CREATED.length() == keyLength &&
-            MARK_CREATED.equals(key))
+        if (keyLength >= MIN_LENGHT_CHECK)
         {
-            Object oldValue = _component.getOamVfMarkCreated();
-            _component.setOamVfMarkCreated(null);
-            return oldValue;
-        }
-        else if (FACET_NAME_KEY.length() == keyLength &&
-            FACET_NAME_KEY.equals(key))
-        {
-            Object oldValue = _component.getOamVfFacetName();
-            _component.setOamVfFacetName(null);
-            return oldValue;
+            if (MARK_CREATED.length() == keyLength &&
+                MARK_CREATED.equals(key))
+            {
+                Object oldValue = _component.getOamVfMarkCreated();
+                _component.setOamVfMarkCreated(null);
+                return oldValue;
+            }
+            else if (FACET_NAME_KEY.length() == keyLength &&
+                FACET_NAME_KEY.equals(key))
+            {
+                Object oldValue = _component.getOamVfFacetName();
+                _component.setOamVfFacetName(null);
+                return oldValue;
+            }
+            else if (COMPONENT_ADDED_BY_HANDLER_MARKER.length() == keyLength &&
+                COMPONENT_ADDED_BY_HANDLER_MARKER.equals(key))
+            {
+                Object oldValue = _component.isOamVfAddedByHandler();
+                _component.setOamVfAddedByHandler(false);
+                return oldValue;
+            }
+            else if (FACET_CREATED_UIPANEL_MARKER.length() == keyLength &&
+                FACET_CREATED_UIPANEL_MARKER.equals(key))
+            {
+                Object oldValue = _component.isOamVfFacetCreatedUIPanel();
+                _component.setOamVfFacetCreatedUIPanel(false);
+                return oldValue;
+            }
+            else if (UIComponent.BEANINFO_KEY.length() == keyLength 
+                && UIComponent.BEANINFO_KEY.equals(key))
+            {
+                _ccBeanInfo = null;
+            }
         }
         _PropertyDescriptorHolder propertyDescriptor = getPropertyDescriptor((String) key);
         if (propertyDescriptor != null)
@@ -428,19 +539,37 @@ class _ComponentAttributesMap implements
         {
             throw new NullPointerException("key");
         }
-        if (MARK_CREATED.length() == key.length() &&
-            MARK_CREATED.equals(key))
+        int keyLength = ((String)key).length();
+        if (keyLength >= MIN_LENGHT_CHECK)
         {
-            String oldValue = _component.getOamVfMarkCreated();
-            _component.setOamVfMarkCreated((String)value);
-            return oldValue;
-        }
-        else if (FACET_NAME_KEY.length() == key.length() &&
-            FACET_NAME_KEY.equals(key))
-        {
-            Object oldValue = _component.getOamVfFacetName();
-            _component.setOamVfFacetName((String)value);
-            return oldValue;
+            if (MARK_CREATED.length() == keyLength &&
+                MARK_CREATED.equals(key))
+            {
+                String oldValue = _component.getOamVfMarkCreated();
+                _component.setOamVfMarkCreated((String)value);
+                return oldValue;
+            }
+            else if (FACET_NAME_KEY.length() == keyLength &&
+                FACET_NAME_KEY.equals(key))
+            {
+                Object oldValue = _component.getOamVfFacetName();
+                _component.setOamVfFacetName((String)value);
+                return oldValue;
+            }
+            else if (COMPONENT_ADDED_BY_HANDLER_MARKER.length() == keyLength &&
+                COMPONENT_ADDED_BY_HANDLER_MARKER.equals(key))
+            {
+                Object oldValue = _component.isOamVfAddedByHandler();
+                _component.setOamVfAddedByHandler((Boolean)value);
+                return oldValue;
+            }
+            else if (FACET_CREATED_UIPANEL_MARKER.length() == keyLength &&
+                FACET_CREATED_UIPANEL_MARKER.equals(key))
+            {
+                Object oldValue = _component.isOamVfFacetCreatedUIPanel();
+                _component.setOamVfFacetCreatedUIPanel((Boolean)value);
+                return oldValue;
+            }
         }
         _PropertyDescriptorHolder propertyDescriptor = getPropertyDescriptor(key);
         if (propertyDescriptor == null)
@@ -463,12 +592,17 @@ class _ComponentAttributesMap implements
         }
         // To keep this code in good shape, The fastest way to compare is look if the length first here
         // because we avoid an unnecessary cast later on equals().
-        if ( Resource.COMPONENT_RESOURCE_KEY.length() == key.length() 
+        if ( Resource.COMPONENT_RESOURCE_KEY.length() == keyLength 
              && Resource.COMPONENT_RESOURCE_KEY.equals(key))
         {
             _isCompositeComponent = true;
             _isCompositeComponentSet = true;
         }
+        if (UIComponent.BEANINFO_KEY.length() == keyLength 
+            && UIComponent.BEANINFO_KEY.equals(key))
+        {
+            _ccBeanInfo = (BeanInfo) value;
+        }
         return _component.getStateHelper().put(UIComponentBase.PropertyKeys.attributesMap, key, value);
     }
 

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/PartialResponseWriter.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/PartialResponseWriter.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/PartialResponseWriter.java (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/java/javax/faces/context/PartialResponseWriter.java Tue Nov  6 17:29:35 2012
@@ -146,6 +146,13 @@ public class PartialResponseWriter exten
         _wrapped.write ("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
         
         _wrapped.startElement ("partial-response", null);
+        
+        // If by some reason the response has been reset, and the same
+        // PartialResponseWriter is used, it is necessary to ensure any 
+        // variable is initialized in a consistent state. To do that,
+        // the best point is when the document is started.
+        hasChanges = false;
+        insertType = null;
     }
 
     public void startError(String errorName) throws IOException

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomExperimental.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomExperimental.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomExperimental.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomExperimental.js Tue Nov  6 17:29:35 2012
@@ -1,3 +1,18 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 if (_MF_SINGLTN) {
     _MF_SINGLTN(_PFX_UTIL + "_DomExperimental", myfaces._impl._util._Dom, /** @lends myfaces._impl._util._Dom.prototype */ {
         constructor_:function () {
@@ -103,13 +118,11 @@ if (_MF_SINGLTN) {
                 executes = this._Lang.strToArray(executes, /\s+/);
             }
 
-            for (var executable in executes) {
-                if (!executes.hasOwnProperty(executable)) continue;
-                var element = this.byId(executes[executable]);
+            for (var cnt = 0, len = executes.length; cnt < len ; cnt ++) {
+                var element = this.byId(executes[cnt]);
                 var inputs = this.findByTagName(element, "input", true);
-                for (var key in inputs) {
-                    if (!inputs.hasOwnProperty(key)) continue;
-                    if (this.getAttribute(inputs[key], "type") == "file") return true;
+                for (var cnt2 = 0, len2 = inputs.length; cnt2 < len2 ; cnt2++) {
+                    if (this.getAttribute(inputs[cnt2], "type") == "file") return true;
                 }
             }
             return false;

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js Tue Nov  6 17:29:35 2012
@@ -1,3 +1,18 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 _MF_SINGLTN && _MF_SINGLTN(_PFX_UTIL + "_ExtLang", myfaces._impl._util._Lang, {
 
     _RT:myfaces._impl.core._Runtime,

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/Impl.js Tue Nov  6 17:29:35 2012
@@ -232,7 +232,10 @@ _MF_SINGLTN(_PFX_CORE + "Impl", _MF_OBJE
             /*compliance with Mojarra which automatically adds @this to an execute
              * the spec rev 2.0a however states, if none is issued nothing at all should be sent down
              */
-            this._transformList(passThrgh, this.P_EXECUTE, options.execute + " @this", form, elementId);
+            if(options.execute.indexOf("@this") == -1) {
+                options.execute = options.execute + " @this";
+            }
+            this._transformList(passThrgh, this.P_EXECUTE, options.execute, form, elementId);
         } else {
             passThrgh[this.P_EXECUTE] = elementId;
         }
@@ -375,6 +378,7 @@ _MF_SINGLTN(_PFX_CORE + "Impl", _MF_OBJE
         //it uses an array and an index to position all elements correctly
         //the offset variable is there to prevent 0 which results in a javascript
         //false
+        srcStr = _Lang.trim(srcStr);
         var offset = 1,
                 vals = (srcStr) ? srcStr.split(/\s+/) : [],
                 idIdx = (vals.length) ? _Lang.arrToMap(vals, offset) : {},
@@ -386,8 +390,10 @@ _MF_SINGLTN(_PFX_CORE + "Impl", _MF_OBJE
                 theForm = idIdx[this.IDENT_FORM];
 
         if (none) {
-            //in case of none only one value is returned
-            passThrgh[target] = this.IDENT_NONE;
+            //in case of none nothing is returned
+            if('undefined' != typeof passThrgh.target) {
+                delete passThrgh.target;
+            }
             return passThrgh;
         }
         if (all) {

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_EvalHandlers.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_EvalHandlers.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_EvalHandlers.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_EvalHandlers.js Tue Nov  6 17:29:35 2012
@@ -1,3 +1,19 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * @namespace
  * @name window

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_RuntimeQuirks.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_RuntimeQuirks.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_RuntimeQuirks.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_RuntimeQuirks.js Tue Nov  6 17:29:35 2012
@@ -1,3 +1,18 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 if (!document.querySelectorAll) {
 
     //initial browser detection, we encapsule it in a closure

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js Tue Nov  6 17:29:35 2012
@@ -603,7 +603,7 @@ _MF_SINGLTN(_PFX_XHR + "_AjaxResponse", 
                 _Dom.byIdOrName(itemIdToReplace);
 
         if (!item) {
-            throw this._raiseError(_Lang.getMessage("ERR_ITEM_ID_NOTFOUND", null, "_AjaxResponse.replaceHtmlItem", (itemIdToReplace) ? itemIdToReplace.toString() : "undefined"));
+            throw this._raiseError(new Error(), _Lang.getMessage("ERR_ITEM_ID_NOTFOUND", null, "_AjaxResponse.replaceHtmlItem", (itemIdToReplace) ? itemIdToReplace.toString() : "undefined"),"replaceHtmlItem");
         }
         return _Dom.outerHTML(item, markup);
     },

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_Transports.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_Transports.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_Transports.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_Transports.js Tue Nov  6 17:29:35 2012
@@ -159,7 +159,7 @@ _MF_SINGLTN(_PFX_XHR + "_Transports", _M
     _getAjaxReqClass: function(context) {
         // var _RT = myfaces._impl.core._Runtime;
         //if(_RT.getXHRLvl() < 2) {
-        return myfaces._impl.xhrCore._AjaxRequest;
+            return myfaces._impl.xhrCore._AjaxRequest;
         //} else {
         //    return myfaces._impl.xhrCore._AjaxRequestLevel2;
         //}

Modified: myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/engine/BaseRequest.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/engine/BaseRequest.js?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/engine/BaseRequest.js (original)
+++ myfaces/core/branches/2.1.x-client-window/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/engine/BaseRequest.js Tue Nov  6 17:29:35 2012
@@ -1,3 +1,18 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 /**
  * Abstract Base for all classes which simulate the xhr level2 object
  * with a different transport

Modified: myfaces/core/branches/2.1.x-client-window/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/pom.xml?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/pom.xml (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/pom.xml Tue Nov  6 17:29:35 2012
@@ -53,6 +53,44 @@
         
         <plugins>
 
+            <!-- license checker needs to exclude some kinds of files -->
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        
+                        <!-- The xsd files are CDDL+GLP:
+                          Category B: Reciprocal Licenses
+                         "For small amounts of source that is directly consumed by the ASF product
+                          at runtime in source form, and for which that source is unlikely to be
+                          changed anyway (say, by virtue of being specified by a standard), this
+                          action is sufficient. An example of this is the web-facesconfig_1_0.dtd,
+                          whose inclusion is mandated by the JSR 127: JavaServer Faces specification."
+                          http://www.apache.org/legal/3party.html
+                        -->
+                        <exclude>src/main/resources/META-INF/licenses/glassfish-LICENSE.txt</exclude>
+                        <exclude>src/main/resources/org/apache/myfaces/resource/javaee_5.xsd</exclude>
+                        <exclude>src/main/resources/org/apache/myfaces/resource/javaee_web_services_client_1_2.xsd</exclude>
+
+                        <!-- facelets has non-standard APL license -->
+                        <exclude>src/main/resources/META-INF/licenses/facelets-LICENSE.txt</exclude>
+                        
+                        <!-- services files are trivial config files with no comments -->
+                        <exclude>src/test/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider</exclude>
+                        <exclude>src/main/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider</exclude>
+
+                        <!-- these jsf.js files are trivial empty placeholders -->
+                        <exclude>src/test/resources/org/apache/myfaces/view/facelets/tag/composite/javax.faces/jsf.js</exclude>
+                        <exclude>src/test/resources/org/apache/myfaces/view/facelets/tag/jsf/html/javax.faces/jsf.js</exclude>
+                        <exclude>src/test/resources/org/apache/myfaces/view/facelets/updateheadres/resources/javax.faces/jsf.js</exclude>
+
+                        <!-- This file probably needs a license, but I don't know if it's safe to put it in there -->
+                        <exclude>src/test/resources/org/apache/myfaces/context/nestedScriptCDATA.xml</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+            
             <!-- myfaces-build-plugin - we generate a lot of stuff with this plugin (see executions) -->
             <plugin>
                 <groupId>org.apache.myfaces.buildtools</groupId>
@@ -465,7 +503,6 @@
             <!-- run test-cases -->
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.5</version>
                 <configuration>
                     <!-- Only run JUnit tests -->
                     <testNGArtifactName>none:none</testNGArtifactName>

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/conf/META-INF/.standard-faces-config-base.xml.jsfdia
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/conf/META-INF/.standard-faces-config-base.xml.jsfdia?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/conf/META-INF/.standard-faces-config-base.xml.jsfdia (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/conf/META-INF/.standard-faces-config-base.xml.jsfdia Tue Nov  6 17:29:35 2012
@@ -1,2 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
 <PROCESS model-entity="JSFProcess"/>

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/application/ViewHandlerImpl.java Tue Nov  6 17:29:35 2012
@@ -97,7 +97,7 @@ public class ViewHandlerImpl extends Vie
             try
             {
                 //TODO: JSF 2.0 - need to make sure calculateViewId follows the new algorithm from 7.5.2 
-                return getViewHandlerSupport().calculateAndCheckViewId(context, input);
+                return getViewHandlerSupport(context).calculateAndCheckViewId(context, input);
             }
             catch (InvalidViewIdException e)
             {
@@ -115,7 +115,7 @@ public class ViewHandlerImpl extends Vie
             try
             {
                 //TODO: JSF 2.0 - need to make sure calculateViewId follows the new algorithm from 7.5.2 
-                return getViewHandlerSupport().calculateViewId(context, rawViewId);
+                return getViewHandlerSupport(context).calculateViewId(context, rawViewId);
             }
             catch (InvalidViewIdException e)
             {
@@ -241,7 +241,7 @@ public class ViewHandlerImpl extends Vie
     public UIViewRoot createView(FacesContext context, String viewId)
     {
        checkNull(context, "facesContext");
-       String calculatedViewId = getViewHandlerSupport().calculateViewId(context, viewId);
+       String calculatedViewId = getViewHandlerSupport(context).calculateViewId(context, viewId);
        
        // we cannot use this.getVDL() directly (see getViewHandler())
        //return getViewHandler(context)
@@ -254,7 +254,7 @@ public class ViewHandlerImpl extends Vie
     @Override
     public String getActionURL(FacesContext context, String viewId)
     {
-        return getViewHandlerSupport().calculateActionURL(context, viewId);
+        return getViewHandlerSupport(context).calculateActionURL(context, viewId);
     }
 
     @Override
@@ -290,7 +290,7 @@ public class ViewHandlerImpl extends Vie
     {
         checkNull(context, "context");
     
-        String calculatedViewId = getViewHandlerSupport().calculateViewId(context, viewId);
+        String calculatedViewId = getViewHandlerSupport(context).calculateViewId(context, viewId);
         
         // we cannot use this.getVDL() directly (see getViewHandler())
         //return getViewHandler(context)
@@ -404,7 +404,7 @@ public class ViewHandlerImpl extends Vie
         }
         else
         {
-            String calculatedViewId = getViewHandlerSupport().calculateViewId(context, viewId);  
+            String calculatedViewId = getViewHandlerSupport(context).calculateViewId(context, viewId);  
             // we cannot use this.getVDL() directly (see getViewHandler())
             //ViewDeclarationLanguage vdl = getViewHandler(context).
             //        getViewDeclarationLanguage(context, calculatedViewId);
@@ -503,9 +503,14 @@ public class ViewHandlerImpl extends Vie
     
     protected ViewHandlerSupport getViewHandlerSupport()
     {
+        return getViewHandlerSupport(FacesContext.getCurrentInstance());
+    }
+
+    protected ViewHandlerSupport getViewHandlerSupport(FacesContext context)
+    {
         if (_viewHandlerSupport == null)
         {
-            _viewHandlerSupport = new DefaultViewHandlerSupport();
+            _viewHandlerSupport = new DefaultViewHandlerSupport(context);
         }
         return _viewHandlerSupport;
     }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/element/FaceletsProcessing.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/element/FaceletsProcessing.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/element/FaceletsProcessing.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/element/FaceletsProcessing.java Tue Nov  6 17:29:35 2012
@@ -34,4 +34,9 @@ public abstract class FaceletsProcessing
     public abstract String getFileExtension();
     
     public abstract String getProcessAs();
+    
+    public String getOamCompressSpaces()
+    {
+        return "false";
+    }
 }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java Tue Nov  6 17:29:35 2012
@@ -298,6 +298,10 @@ public class DigesterFacesConfigUnmarsha
         digester.addCallMethod("faces-config/faces-config-extension/facelets-processing/process-as", "setProcessAs", 0);
 
         // 2.1 facelets-processing end
+        
+        //MyFaces specific facelets-processing instruction.
+        digester.addCallMethod("faces-config/faces-config-extension/facelets-processing/oam-compress-spaces", 
+                "setOamCompressSpaces", 0);
     }
 
     public FacesConfig getFacesConfig(InputStream in, String systemId) throws IOException, SAXException

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FaceletsProcessing.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FaceletsProcessing.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FaceletsProcessing.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/FaceletsProcessing.java Tue Nov  6 17:29:35 2012
@@ -33,6 +33,8 @@ public class FaceletsProcessing extends 
     private String fileExtension;
     
     private String processAs;
+    
+    private String oamCompressSpaces;
 
     public String getFileExtension()
     {
@@ -53,4 +55,21 @@ public class FaceletsProcessing extends 
     {
         this.processAs = processAs;
     }
+
+    /**
+     * @return the oamCompressSpaces
+     */
+    @Override
+    public String getOamCompressSpaces()
+    {
+        return oamCompressSpaces;
+    }
+
+    /**
+     * @param oamCompressSpaces the oamCompressSpaces to set
+     */
+    public void setOamCompressSpaces(String oamCompressSpaces)
+    {
+        this.oamCompressSpaces = oamCompressSpaces;
+    }
 }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java Tue Nov  6 17:29:35 2012
@@ -661,9 +661,9 @@ public class PartialViewContextImpl exte
             {
                 for (UIComponent grandchild : child.getChildren())
                 {
-                    if (child instanceof HtmlHead)
+                    if (grandchild instanceof HtmlHead)
                     {
-                        return child;
+                        return grandchild;
                     }
                 }
             }
@@ -683,9 +683,9 @@ public class PartialViewContextImpl exte
             {
                 for (UIComponent grandchild : child.getChildren())
                 {
-                    if (child instanceof HtmlBody)
+                    if (grandchild instanceof HtmlBody)
                     {
-                        return child;
+                        return grandchild;
                     }
                 }
             }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/CompositeComponentELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/CompositeComponentELResolver.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/CompositeComponentELResolver.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/CompositeComponentELResolver.java Tue Nov  6 17:29:35 2012
@@ -37,6 +37,7 @@ import javax.faces.el.CompositeComponent
 
 import org.apache.myfaces.shared.config.MyfacesConfig;
 import org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage;
+import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentBeanInfo;
 
 /**
  * Composite component attribute EL resolver.  See JSF spec, section 5.6.2.2.
@@ -275,6 +276,7 @@ public final class CompositeComponentELR
         private final BeanInfo _beanInfo;
         private final Map<String, Object> _originalMap;
         private final PropertyDescriptor [] _propertyDescriptors;
+        private final CompositeComponentBeanInfo _ccBeanInfo;
 
         private CompositeComponentAttributesMapWrapper(UIComponent component)
         {
@@ -282,6 +284,8 @@ public final class CompositeComponentELR
             this._originalMap = component.getAttributes();
             this._beanInfo = (BeanInfo) _originalMap.get(UIComponent.BEANINFO_KEY);
             this._propertyDescriptors = _beanInfo.getPropertyDescriptors();
+            this._ccBeanInfo = (this._beanInfo instanceof CompositeComponentBeanInfo) ?
+                (CompositeComponentBeanInfo) this._beanInfo : null;
         }
 
         public ValueExpression getExpression(String name)
@@ -327,12 +331,23 @@ public final class CompositeComponentELR
             }
             else
             {
-                for (PropertyDescriptor attribute : _propertyDescriptors)
+                if (_ccBeanInfo == null)
                 {
-                    if (attribute.getName().equals(key))
+                    for (PropertyDescriptor attribute : _propertyDescriptors)
+                    {
+                        if (attribute.getName().equals(key))
+                        {
+                            obj = attribute.getValue("default");
+                            break;
+                        }
+                    }
+                }
+                else
+                {
+                    PropertyDescriptor attribute = _ccBeanInfo.getPropertyDescriptorsMap().get(key);
+                    if (attribute != null)
                     {
                         obj = attribute.getValue("default");
-                        break;
                     }
                 }
                 // We have to check for a ValueExpression and also evaluate it

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResourceBundleResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResourceBundleResolver.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResourceBundleResolver.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResourceBundleResolver.java Tue Nov  6 17:29:35 2012
@@ -55,6 +55,17 @@ public final class ResourceBundleResolve
     public void setValue(final ELContext context, final Object base, final Object property, final Object value)
         throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
     {
+        // JSF 2.0 spec section 5.6.1.4
+        // "... If base is null and property is a String equal to the value of the
+        // <var> element of one of the <resource-bundle>'s in the application 
+        // configuration resources throw javax.el.PropertyNotWriteable, since
+        // ResourceBundles are read-only. ..."
+        // Since something is done only when base is null, it is better to check 
+        // for not null and return.
+        if (base != null)
+        {
+            return;
+        }
 
         if ((base == null) && (property == null))
         {
@@ -66,6 +77,7 @@ public final class ResourceBundleResolve
             return;
         }
 
+        // base is null and property is a String value, check for resource bundle.
         final ResourceBundle bundle = getResourceBundle(context, (String)property);
 
         if (bundle != null)

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java Tue Nov  6 17:29:35 2012
@@ -93,6 +93,27 @@ public class DefaultRestoreViewSupport i
     
     private RenderKitFactory _renderKitFactory = null;
     private VisitContextFactory _visitContextFactory = null;
+    
+    private final String[] _faceletsViewMappings;
+    private final String[] _contextSuffixes;
+    private final String _faceletsContextSufix;
+    private final boolean _initialized;
+    
+    public DefaultRestoreViewSupport()
+    {
+        _faceletsViewMappings = null;
+        _contextSuffixes = null;
+        _faceletsContextSufix = null;
+        _initialized = false;
+    }
+    
+    public DefaultRestoreViewSupport(FacesContext facesContext)
+    {
+        _faceletsViewMappings = getFaceletsViewMappings(facesContext);
+        _contextSuffixes = getContextSuffix(facesContext);
+        _faceletsContextSufix = getFaceletsContextSuffix(facesContext);
+        _initialized = true;
+    }
 
     public void processComponentBinding(FacesContext facesContext, UIComponent component)
     {
@@ -387,8 +408,8 @@ public class DefaultRestoreViewSupport i
      */
     protected String handleSuffixMapping(FacesContext context, String requestViewId)
     {
-        String[] faceletsViewMappings = getFaceletsViewMappings(context);
-        String[] jspDefaultSuffixes = getContextSuffix(context);
+        String[] faceletsViewMappings = _initialized ? _faceletsViewMappings : getFaceletsViewMappings(context);
+        String[] jspDefaultSuffixes = _initialized ? _contextSuffixes : getContextSuffix(context);
         
         int slashPos = requestViewId.lastIndexOf('/');
         int extensionPos = requestViewId.lastIndexOf('.');
@@ -443,7 +464,7 @@ public class DefaultRestoreViewSupport i
         }
         
         //jsp suffixes didn't match, try facelets suffix
-        String faceletsDefaultSuffix = this.getFaceletsContextSuffix(context);
+        String faceletsDefaultSuffix = _initialized ? _faceletsContextSufix : this.getFaceletsContextSuffix(context);
         if (faceletsDefaultSuffix != null)
         {
             for (String defaultSuffix : jspDefaultSuffixes)

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java Tue Nov  6 17:29:35 2012
@@ -79,7 +79,7 @@ class RestoreViewExecutor extends PhaseE
         Application application = facesContext.getApplication();
         ViewHandler viewHandler = application.getViewHandler();
         UIViewRoot viewRoot = facesContext.getViewRoot();
-        RestoreViewSupport restoreViewSupport = getRestoreViewSupport();
+        RestoreViewSupport restoreViewSupport = getRestoreViewSupport(facesContext);
 
         // Examine the FacesContext instance for the current request. If it already contains a UIViewRoot
         if (viewRoot != null)
@@ -284,9 +284,14 @@ class RestoreViewExecutor extends PhaseE
     
     protected RestoreViewSupport getRestoreViewSupport()
     {
+        return getRestoreViewSupport(FacesContext.getCurrentInstance());
+    }
+    
+    protected RestoreViewSupport getRestoreViewSupport(FacesContext context)
+    {
         if (_restoreViewSupport == null)
         {
-            _restoreViewSupport = new DefaultRestoreViewSupport();
+            _restoreViewSupport = new DefaultRestoreViewSupport(context);
         }
         return _restoreViewSupport;
     }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java Tue Nov  6 17:29:35 2012
@@ -1173,10 +1173,7 @@ public class DefaultFaceletsStateManagem
                 if (!isRefreshOnTransientBuildPreserveState() &&
                     FaceletCompositionContext.getCurrentInstance(_facesContext) != null &&
                     (component.getAttributes().containsKey(ComponentSupport.MARK_CREATED) ||
-                     component.getAttributes().containsKey(ComponentSupport.FACET_CREATED_UIPANEL_MARKER)) ||
-                     (component.getId() != null && component.getId().length() > 16 && 
-                      component.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX) && 
-                      component.getId().endsWith("__f_cc_facet") )
+                     component.getAttributes().containsKey(ComponentSupport.COMPONENT_ADDED_BY_HANDLER_MARKER))
                     )
                 {
                     // Components removed by facelets algorithm does not need to be registered

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompilationManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompilationManager.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompilationManager.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompilationManager.java Tue Nov  6 17:29:35 2012
@@ -123,7 +123,9 @@ final class CompilationManager
         }
         else
         {
-            unit = new TextUnit(this.alias, this.nextTagId(), faceletsProcessingInstructions.isEscapeInlineText());
+            unit = new TextUnit(this.alias, this.nextTagId(), 
+                    faceletsProcessingInstructions.isEscapeInlineText(),
+                    faceletsProcessingInstructions.isCompressSpaces());
             this.startUnit(unit);
         }
         unit.writeInstruction(value);
@@ -150,7 +152,9 @@ final class CompilationManager
         }
         else
         {
-            unit = new TextUnit(this.alias, this.nextTagId(), faceletsProcessingInstructions.isEscapeInlineText());
+            unit = new TextUnit(this.alias, this.nextTagId(), 
+                    faceletsProcessingInstructions.isEscapeInlineText(),
+                    faceletsProcessingInstructions.isCompressSpaces());
             this.startUnit(unit);
         }
         unit.write(value);
@@ -181,7 +185,9 @@ final class CompilationManager
         }
         else
         {
-            unit = new TextUnit(this.alias, this.nextTagId(), faceletsProcessingInstructions.isEscapeInlineText());
+            unit = new TextUnit(this.alias, this.nextTagId(), 
+                    faceletsProcessingInstructions.isEscapeInlineText(),
+                    faceletsProcessingInstructions.isCompressSpaces());
             this.startUnit(unit);
         }
 
@@ -291,7 +297,9 @@ final class CompilationManager
             }
             else
             {
-                unit = new TextUnit(this.alias, this.nextTagId(), faceletsProcessingInstructions.isEscapeInlineText());
+                unit = new TextUnit(this.alias, this.nextTagId(),
+                        faceletsProcessingInstructions.isEscapeInlineText(),
+                        faceletsProcessingInstructions.isCompressSpaces());
                 this.startUnit(unit);
             }
             

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java Tue Nov  6 17:29:35 2012
@@ -40,6 +40,18 @@ public final class FaceletsProcessingIns
     private static final FaceletsProcessingInstructions FACELETS_PROCESSING_JSPX =
         new FaceletsProcessingInstructions(
                 true, true, true, true, false, true, false);
+    
+    private static final FaceletsProcessingInstructions FACELETS_PROCESSING_XHTML_COMPRESS_SPACES =
+        new FaceletsProcessingInstructions(
+                false, false, false, false, true, false, true, true);
+
+    private static final FaceletsProcessingInstructions FACELETS_PROCESSING_XML_COMPRESS_SPACES =
+        new FaceletsProcessingInstructions(
+                true, true, true, true, true, true, true, true);
+
+    private static final FaceletsProcessingInstructions FACELETS_PROCESSING_JSPX_COMPRESS_SPACES =
+        new FaceletsProcessingInstructions(
+                true, true, true, true, false, true, false, true);
 
     private final boolean consumeXmlDocType;
     
@@ -55,6 +67,8 @@ public final class FaceletsProcessingIns
     
     private final boolean swallowCDataContent;
     
+    private final boolean compressSpaces;
+    
     public final static FaceletsProcessingInstructions getProcessingInstructions(String processAs)
     {
         if (processAs == null)
@@ -79,6 +93,35 @@ public final class FaceletsProcessingIns
         }
     }
     
+    public final static FaceletsProcessingInstructions getProcessingInstructions(
+            String processAs, boolean compressSpaces)
+    {
+        if (!compressSpaces)
+        {
+            return getProcessingInstructions(processAs);
+        }
+        if (processAs == null)
+        {
+            return FACELETS_PROCESSING_XHTML_COMPRESS_SPACES;
+        }
+        else if (PROCESS_AS_XHTML.equals(processAs))
+        {
+            return FACELETS_PROCESSING_XHTML_COMPRESS_SPACES;
+        }
+        else if (PROCESS_AS_XML.equals(processAs))
+        {
+            return FACELETS_PROCESSING_XML_COMPRESS_SPACES;
+        }
+        else if (PROCESS_AS_JSPX.equals(processAs))
+        {
+            return FACELETS_PROCESSING_JSPX_COMPRESS_SPACES;
+        }
+        else
+        {
+            return FACELETS_PROCESSING_XHTML_COMPRESS_SPACES;
+        }
+    }    
+    
     public FaceletsProcessingInstructions(
             boolean consumeXmlDocType,
             boolean consumeXmlDeclaration,
@@ -96,6 +139,29 @@ public final class FaceletsProcessingIns
         this.escapeInlineText = escapeInlineText;
         this.consumeXMLComments = consumeXMLComments;
         this.swallowCDataContent = swallowCDataContent;
+        this.compressSpaces = false;
+    }
+    
+    
+    public FaceletsProcessingInstructions(
+            boolean consumeXmlDocType,
+            boolean consumeXmlDeclaration,
+            boolean consumeProcessingInstructions,
+            boolean consumeCDataSections, 
+            boolean escapeInlineText,
+            boolean consumeXMLComments,
+            boolean swallowCDataContent,
+            boolean compressSpaces)
+    {
+        super();
+        this.consumeXmlDocType = consumeXmlDocType;
+        this.consumeXmlDeclaration = consumeXmlDeclaration;
+        this.consumeProcessingInstructions = consumeProcessingInstructions;
+        this.consumeCDataSections = consumeCDataSections;
+        this.escapeInlineText = escapeInlineText;
+        this.consumeXMLComments = consumeXMLComments;
+        this.swallowCDataContent = swallowCDataContent;
+        this.compressSpaces = compressSpaces;
     }
 
     public boolean isConsumeXmlDocType()
@@ -133,4 +199,12 @@ public final class FaceletsProcessingIns
         return swallowCDataContent;
     }
 
+    /**
+     * @return the compressSpaces
+     */
+    public boolean isCompressSpaces()
+    {
+        return compressSpaces;
+    }
+
 }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralNonExcapedTextInstruction.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralNonExcapedTextInstruction.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralNonExcapedTextInstruction.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralNonExcapedTextInstruction.java Tue Nov  6 17:29:35 2012
@@ -52,4 +52,9 @@ final class LiteralNonExcapedTextInstruc
     {
         return true;
     }
+    
+    String getText()
+    {
+        return this.text;
+    }
 }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralTextInstruction.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralTextInstruction.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralTextInstruction.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/LiteralTextInstruction.java Tue Nov  6 17:29:35 2012
@@ -47,4 +47,9 @@ final class LiteralTextInstruction imple
     {
         return true;
     }
+
+    String getText()
+    {
+        return this.text;
+    }
 }

Modified: myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java?rev=1406236&r1=1406235&r2=1406236&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java (original)
+++ myfaces/core/branches/2.1.x-client-window/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java Tue Nov  6 17:29:35 2012
@@ -864,15 +864,17 @@ public final class SAXCompiler extends C
     protected FaceletsProcessingInstructions getFaceletsProcessingInstructions(URL src, String alias)
     {
         String processAs = null;
+        boolean compressSpaces = false;
         for (FaceletsProcessing entry : getFaceletsProcessingConfigurations())
         {
             if (src.getPath().endsWith(entry.getFileExtension()))
             {
                 processAs = entry.getProcessAs();
+                compressSpaces = Boolean.valueOf(entry.getOamCompressSpaces());
                 break;
             }
         }
-        return FaceletsProcessingInstructions.getProcessingInstructions(processAs);
+        return FaceletsProcessingInstructions.getProcessingInstructions(processAs, compressSpaces);
     }
 
     protected static final String writeXmlDecl(InputStream is, CompilationManager mngr) throws IOException



Mime
View raw message