You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/08/17 01:13:17 UTC

svn commit: r804808 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java

Author: lu4242
Date: Sun Aug 16 23:13:16 2009
New Revision: 804808

URL: http://svn.apache.org/viewvc?rev=804808&view=rev
Log:
MYFACES-2331 Implement Composite Component Attributes ELResolver (jsf 2.0 spec section 5.6.2.2) and add implicit object "cc" and "component"

Added:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java   (with props)

Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java?rev=804808&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java Sun Aug 16 23:13:16 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.el.unified.resolver.implicitobject;
+
+import java.beans.FeatureDescriptor;
+
+import javax.el.ELContext;
+import javax.faces.component.UIComponent;
+
+/**
+ * Encapsulates information needed by the ImplicitObjectResolver
+ * 
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class CompositeComponentImplicitObject extends ImplicitObject
+{
+
+    private static final String NAME = "cc".intern();
+
+    /** Creates a new instance of CompositeComponentImplicitObjectImplicitObject */
+    public CompositeComponentImplicitObject()
+    {
+    }
+
+    @Override
+    public Object getValue(ELContext context)
+    {
+        return UIComponent.getCurrentCompositeComponent(facesContext(context));
+    }
+
+    @Override
+    public String getName()
+    {
+        return NAME;
+    }
+
+    @Override
+    public Class<?> getType()
+    {
+        return null;
+    }
+
+    @Override
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Represents the composite component most recently pushed using UIComponent.pushComponentToEL", UIComponent.class);
+    }
+}

Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CompositeComponentImplicitObject.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL