You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sl...@apache.org on 2009/04/04 20:44:19 UTC

svn commit: r761981 [7/7] - in /myfaces/core/branches/2_0_0/api/src/main/java/javax/faces: ./ application/ component/ component/behavior/ component/visit/ context/ convert/ event/ model/ render/ validator/ view/ view/facelets/ webapp/ webapp/pdl/

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,69 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.view.AttachedObjectHandler;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-15 17:17:48 -0400 (mer., 17 sept. 2008) $
+ * 
+ * @since 2.0
+ */
+public abstract class FaceletsAttachedObjectHandler extends DelegatingMetaTagHandler implements AttachedObjectHandler
+{
+    /**
+     * 
+     */
+    public FaceletsAttachedObjectHandler(TagConfig config)
+    {
+        super(config);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public final void applyAttachedObject(FacesContext context, UIComponent parent)
+    {
+        // TODO: IMPLEMENT HERE
+    }
+    
+    /**
+     * 
+     * @return
+     */
+    protected final AttachedObjectHandler getAttachedObjectHandlerHelper()
+    {
+        // TODO: IMPLEMENT HERE
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public final String getFor()
+    {
+        // TODO: IMPLEMENT HERE
+        return null;
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FacetHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FacetHandler.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FacetHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/FacetHandler.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,32 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletContext;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-21 09:23:56 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public interface FacetHandler
+{
+    public String getFacetName(FaceletContext ctx);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Location.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Location.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Location.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Location.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,84 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+/**
+ * An object that represents the Location of a Tag or TagAttribute in a Facelet file.
+ * 
+ * @see javax.faces.view.facelets.tag.Tag
+ * @see javax.faces.view.facelets.tag.TagAttribute
+ * @author Jacob Hookom
+ * @version $Id: Location.java,v 1.4 2008/07/13 19:01:35 rlubke Exp $
+ */
+public final class Location
+{
+
+    private final String path;
+
+    private final int line;
+
+    private final int column;
+
+    public Location(String path, int line, int column)
+    {
+        this.path = path;
+        this.line = line;
+        this.column = column;
+    }
+
+    /**
+     * Estimated character column
+     * 
+     * @return character column
+     */
+    public int getColumn()
+    {
+        return column;
+    }
+
+    /**
+     * Line this is located at
+     * 
+     * @return link this is located at
+     */
+    public int getLine()
+    {
+        return line;
+    }
+
+    /**
+     * File path to this location
+     * 
+     * @return file path
+     */
+    public String getPath()
+    {
+        return path;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return path + " @" + this.line + "," + this.column;
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRule.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRule.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRule.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRule.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,38 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+/**
+ * A potential rule for Metadata on the passed MetadataTarget
+ * 
+ * @see com.sun.facelets.tag.Metadata
+ * @see com.sun.facelets.tag.MetadataTarget
+ * @author Jacob Hookom
+ * @version $Id: MetaRule.java,v 1.3 2008/07/13 19:01:36 rlubke Exp $
+ */
+public abstract class MetaRule
+{
+    /**
+     * @param name
+     * @param attribute
+     * @param meta
+     * @return
+     */
+    public abstract Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRuleset.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRuleset.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRuleset.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaRuleset.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,64 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+/**
+ * A mutable set of rules to be used in auto-wiring state to a particular object instance. Rules assigned to this object
+ * will be composed into a single Metadata instance.
+ * 
+ * @author Jacob Hookom
+ * @version $Id: MetaRuleset.java,v 1.3 2008/07/13 19:01:35 rlubke Exp $
+ */
+public abstract class MetaRuleset
+{
+    /**
+     * @param mapper
+     * @return
+     */
+    public abstract MetaRuleset add(Metadata mapper);
+
+    /**
+     * @param rule
+     * @return
+     */
+    public abstract MetaRuleset addRule(MetaRule rule);
+
+    /**
+     * @param attribute
+     * @param property
+     * @return
+     */
+    public abstract MetaRuleset alias(String attribute, String property);
+
+    /**
+     * @return
+     */
+    public abstract Metadata finish();
+
+    /**
+     * @param attribute
+     * @return
+     */
+    public abstract MetaRuleset ignore(String attribute);
+
+    /**
+     * @return
+     */
+    public abstract MetaRuleset ignoreAll();
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaTagHandler.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaTagHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetaTagHandler.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,71 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletContext;
+
+/**
+ * A base tag for wiring state to an object instance based on rules populated at the time of creating a MetaRuleset.
+ * 
+ * @author Jacob Hookom
+ * @version $Id: MetaTagHandler.java,v 1.3 2008/07/13 19:01:35 rlubke Exp $
+ */
+public abstract class MetaTagHandler extends TagHandler
+{
+    private Class<?> _lastType = Object.class;
+
+    private Metadata _mapper;
+
+    public MetaTagHandler(TagConfig config)
+    {
+        super(config);
+    }
+
+    /**
+     * Extend this method in order to add your own rules.
+     * 
+     * @param type
+     * @return
+     * 
+     * FIXME: EG _ GENERIC
+     */
+    protected abstract MetaRuleset createMetaRuleset(Class<?> type);
+
+    /**
+     * Invoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to 
+     * the passed instance.
+     * 
+     * @param ctx
+     * @param instance
+     */
+    protected void setAttributes(FaceletContext ctx, Object instance)
+    {
+        if (instance != null)
+        {
+            Class<?> type = instance.getClass();
+            if (_mapper == null || !_lastType.equals(type))
+            {
+                _lastType = type;
+                _mapper = createMetaRuleset(type).finish();
+            }
+            
+            _mapper.applyMetadata(ctx, instance);
+        }
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Metadata.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Metadata.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Metadata.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Metadata.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,36 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletContext;
+
+/**
+ * External information on how to wire dynamic or literal state to the passed Object instance.
+ * 
+ * @author Jacob Hookom
+ * @version $Id: Metadata.java,v 1.3 2008/07/13 19:01:35 rlubke Exp $
+ */
+public abstract class Metadata
+{
+    /**
+     * @param ctx
+     * @param instance
+     */
+    public abstract void applyMetadata(FaceletContext ctx, Object instance);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetadataTarget.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetadataTarget.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetadataTarget.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/MetadataTarget.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,68 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+
+/**
+ * Information used with MetaRule for determining how and what Metadata should be wired.
+ * 
+ * @see com.sun.facelets.tag.MetaRule
+ * @see com.sun.facelets.tag.Metadata
+ * @author Jacob Hookom
+ * @version $Id: MetadataTarget.java,v 1.3 2008/07/13 19:01:36 rlubke Exp $
+ */
+public abstract class MetadataTarget
+{
+    /**
+     * @param name
+     * @return
+     */
+    public abstract PropertyDescriptor getProperty(String name);
+
+    /**
+     * @param name
+     * @return
+     */
+    public abstract Class<?> getPropertyType(String name);
+
+    /**
+     * @param name
+     * @return
+     */
+    public abstract Method getReadMethod(String name);
+
+    /**
+     * @return
+     */
+    public abstract Class<?> getTargetClass();
+
+    /**
+     * @param name
+     * @return
+     */
+    public abstract Method getWriteMethod(String name);
+
+    /**
+     * @param type
+     * @return
+     */
+    public abstract boolean isTargetInstanceOf(Class<?> type);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Tag.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Tag.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Tag.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/Tag.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,112 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+/**
+ * Representation of a Tag in the Facelet definition
+ * 
+ * @author Jacob Hookom
+ * @version $Id: Tag.java,v 1.5 2008/07/13 19:01:36 rlubke Exp $
+ */
+public final class Tag
+{
+    private final TagAttributes attributes;
+
+    private final Location location;
+
+    private final String namespace;
+
+    private final String localName;
+
+    private final String qName;
+
+    public Tag(Location location, String namespace, String localName, String qName, TagAttributes attributes)
+    {
+        this.location = location;
+        this.namespace = namespace;
+        this.localName = localName;
+        this.qName = qName;
+        this.attributes = attributes;
+    }
+
+    public Tag(Tag orig, TagAttributes attributes)
+    {
+        this(orig.getLocation(), orig.getNamespace(), orig.getLocalName(), orig.getQName(), attributes);
+    }
+
+    /**
+     * All TagAttributes specified
+     * 
+     * @return all TagAttributes specified
+     */
+    public TagAttributes getAttributes()
+    {
+        return attributes;
+    }
+
+    /**
+     * Local name of the tag &lt;my:tag /> would be "tag"
+     * 
+     * @return local name of the tag
+     */
+    public String getLocalName()
+    {
+        return localName;
+    }
+
+    /**
+     * Location of the Tag in the Facelet file
+     * 
+     * @return location of the Tag in the Facelet file
+     */
+    public Location getLocation()
+    {
+        return location;
+    }
+
+    /**
+     * The resolved Namespace for this tag
+     * 
+     * @return the resolved namespace for this tag
+     */
+    public String getNamespace()
+    {
+        return namespace;
+    }
+
+    /**
+     * Get the qualified name for this tag &lt;my:tag /> would be "my:tag"
+     * 
+     * @return qualified name of the tag
+     */
+    public String getQName()
+    {
+        return qName;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return this.location + " <" + this.qName + ">";
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttribute.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttribute.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttribute.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttribute.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,168 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.el.ExpressionFactory;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+import javax.faces.view.facelets.FaceletContext;
+
+/**
+ * Representation of a Tag's attribute in a Facelet File
+ * 
+ * @author Jacob Hookom
+ * @version $Id: TagAttribute.java,v 1.9 2008/07/13 19:01:35 rlubke Exp $
+ */
+public abstract class TagAttribute
+{
+    public TagAttribute()
+    {
+        
+    }
+
+    /**
+     * If literal, return {@link Boolean#getBoolean(java.lang.String) Boolean.getBoolean(java.lang.String)} passing our
+     * value, otherwise call {@link #getObject(FaceletContext, Class) getObject(FaceletContext, Class)}.
+     * 
+     * @see Boolean#getBoolean(java.lang.String)
+     * @see #getObject(FaceletContext, Class)
+     * @param ctx
+     *            FaceletContext to use
+     * @return boolean value
+     */
+    public abstract boolean getBoolean(FaceletContext ctx);
+
+    /**
+     * If literal, call {@link Integer#parseInt(java.lang.String) Integer.parseInt(String)}, otherwise call
+     * {@link #getObject(FaceletContext, Class) getObject(FaceletContext, Class)}.
+     * 
+     * @see Integer#parseInt(java.lang.String)
+     * @see #getObject(FaceletContext, Class)
+     * @param ctx
+     *            FaceletContext to use
+     * @return int value
+     */
+    public abstract int getInt(FaceletContext ctx);
+
+    /**
+     * Local name of this attribute
+     * 
+     * @return local name of this attribute
+     */
+    public abstract String getLocalName();
+
+    /**
+     * The location of this attribute in the FaceletContext
+     * 
+     * @return the TagAttribute's location
+     */
+    public abstract Location getLocation();
+
+    /**
+     * Create a MethodExpression, using this attribute's value as the expression String.
+     * 
+     * @see ExpressionFactory#createMethodExpression(javax.el.ELContext, java.lang.String, java.lang.Class,
+     *      java.lang.Class[])
+     * @see MethodExpression
+     * @param ctx
+     *            FaceletContext to use
+     * @param type
+     *            expected return type
+     * @param paramTypes
+     *            parameter type
+     * @return a MethodExpression instance
+     */
+    public abstract MethodExpression getMethodExpression(FaceletContext ctx, Class<?> type, Class<?>[] paramTypes);
+
+    /**
+     * The resolved Namespace for this attribute
+     * 
+     * @return resolved Namespace
+     */
+    public abstract String getNamespace();
+
+    /**
+     * Delegates to getObject with Object.class as a param
+     * 
+     * @see #getObject(FaceletContext, Class)
+     * @param ctx
+     *            FaceletContext to use
+     * @return Object representation of this attribute's value
+     */
+    public abstract Object getObject(FaceletContext ctx);
+
+    /**
+     * If literal, simply coerce our String literal value using an ExpressionFactory, otherwise create a ValueExpression
+     * and evaluate it.
+     * 
+     * @see ExpressionFactory#coerceToType(java.lang.Object, java.lang.Class)
+     * @see ExpressionFactory#createValueExpression(javax.el.ELContext, java.lang.String, java.lang.Class)
+     * @see ValueExpression
+     * @param ctx
+     *            FaceletContext to use
+     * @param type
+     *            expected return type
+     * @return Object value of this attribute
+     */
+    public abstract Object getObject(FaceletContext ctx, Class<?> type);
+
+    /**
+     * The qualified name for this attribute
+     * 
+     * @return the qualified name for this attribute
+     */
+    public abstract String getQName();
+
+    /**
+     * Return the literal value of this attribute
+     * 
+     * @return literal value
+     */
+    public abstract String getValue();
+
+    /**
+     * If literal, then return our value, otherwise delegate to getObject, passing String.class.
+     * 
+     * @see #getObject(FaceletContext, Class)
+     * @param ctx
+     *            FaceletContext to use
+     * @return String value of this attribute
+     */
+    public abstract String getValue(FaceletContext ctx);
+
+    /**
+     * Create a ValueExpression, using this attribute's literal value and the passed expected type.
+     * 
+     * @see ExpressionFactory#createValueExpression(javax.el.ELContext, java.lang.String, java.lang.Class)
+     * @see ValueExpression
+     * @param ctx
+     *            FaceletContext to use
+     * @param type
+     *            expected return type
+     * @return ValueExpression instance
+     */
+    public abstract ValueExpression getValueExpression(FaceletContext ctx, Class<?> type);
+
+    /**
+     * If this TagAttribute is literal (not #{..} or ${..})
+     * 
+     * @return true if this attribute is literal
+     */
+    public abstract boolean isLiteral();
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributeException.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributeException.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributeException.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributeException.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,94 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletException;
+
+/**
+ * An Exception caused by a TagAttribute
+ * 
+ * @author Jacob Hookom
+ * @version $Id: TagAttributeException.java,v 1.4 2008/07/13 19:01:36 rlubke Exp $
+ */
+public final class TagAttributeException extends FaceletException
+{
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    public TagAttributeException(TagAttribute attr)
+    {
+        super(attr.toString());
+    }
+
+    public TagAttributeException(TagAttribute attr, String message)
+    {
+        super(attr + " " + message);
+    }
+
+    public TagAttributeException(TagAttribute attr, String message, Throwable cause)
+    {
+        super(attr + " " + message, cause);
+    }
+
+    public TagAttributeException(TagAttribute attr, Throwable cause)
+    {
+        super(attr + " " + cause.getMessage(), cause);
+    }
+
+    /**
+     * 
+     */
+    public TagAttributeException(Tag tag, TagAttribute attr)
+    {
+        super(print(tag, attr));
+    }
+
+    /**
+     * @param message
+     */
+    public TagAttributeException(Tag tag, TagAttribute attr, String message)
+    {
+        super(print(tag, attr) + " " + message);
+    }
+
+    /**
+     * @param message
+     * @param cause
+     */
+    public TagAttributeException(Tag tag, TagAttribute attr, String message, Throwable cause)
+    {
+        super(print(tag, attr) + " " + message, cause);
+    }
+
+    /**
+     * @param cause
+     */
+    public TagAttributeException(Tag tag, TagAttribute attr, Throwable cause)
+    {
+        super(print(tag, attr) + " " + cause.getMessage(), cause);
+    }
+
+    private static String print(Tag tag, TagAttribute attr)
+    {
+        return tag.getLocation() + " <" + tag.getQName() + " " + attr.getQName() + "=\"" + attr.getValue() + "\">";
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributes.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributes.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributes.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagAttributes.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,82 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+
+/**
+ * A set of TagAttributes, usually representing all attributes on a Tag.
+ * 
+ * @see com.sun.facelets.tag.Tag
+ * @see com.sun.facelets.tag.TagAttribute
+ * @author Jacob Hookom
+ * @version $Id: TagAttributes.java,v 1.3 2008/07/13 19:01:35 rlubke Exp $
+ */
+public abstract class TagAttributes
+{
+    /**
+     * 
+     */
+    public TagAttributes()
+    {
+    }
+
+    /**
+     * Using no namespace, find the TagAttribute
+     * 
+     * @see #get(String, String)
+     * @param localName
+     *            tag attribute name
+     * @return the TagAttribute found, otherwise null
+     */
+    public abstract TagAttribute get(String localName);
+
+    /**
+     * Find a TagAttribute that matches the passed namespace and local name.
+     * 
+     * @param ns
+     *            namespace of the desired attribute
+     * @param localName
+     *            local name of the attribute
+     * @return a TagAttribute found, otherwise null
+     */
+    public abstract TagAttribute get(String ns, String localName);
+
+    /**
+     * Return an array of all TagAttributes in this set
+     * 
+     * @return a non-null array of TagAttributes
+     */
+    public abstract TagAttribute[] getAll();
+
+    /**
+     * Get all TagAttributes for the passed namespace
+     * 
+     * @param namespace
+     *            namespace to search
+     * @return a non-null array of TagAttributes
+     */
+    public abstract TagAttribute[] getAll(String namespace);
+
+    /**
+     * A list of Namespaces found in this set
+     * 
+     * @return a list of Namespaces found in this set
+     */
+    public abstract String[] getNamespaces();
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagConfig.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagConfig.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagConfig.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,36 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletHandler;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-15 15:56:42 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public interface TagConfig
+{
+    public FaceletHandler getNextHandler();
+    
+    public Tag getTag();
+    
+    public String getTagId();
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagException.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagException.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagException.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagException.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,69 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletException;
+
+/**
+ * An Exception caused by a Tag
+ * 
+ * @author Jacob Hookom
+ * @version $Id: TagException.java,v 1.4 2008/07/13 19:01:35 rlubke Exp $
+ */
+public final class TagException extends FaceletException
+{
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    public TagException(Tag tag)
+    {
+        super(tag.toString());
+    }
+
+    /**
+     * @param message
+     */
+    public TagException(Tag tag, String message)
+    {
+        super(tag + " " + message);
+    }
+
+    /**
+     * @param message
+     * @param cause
+     */
+    public TagException(Tag tag, String message, Throwable cause)
+    {
+        super(tag + " " + message, cause);
+    }
+
+    /**
+     * @param cause
+     */
+    public TagException(Tag tag, Throwable cause)
+    {
+        super(tag.toString(), cause);
+    }
+
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandler.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandler.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,84 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletHandler;
+
+/**
+ * Foundation class for FaceletHandlers associated with markup in a Facelet document.
+ * 
+ * @author Jacob Hookom
+ * @version $Id: TagHandler.java,v 1.6 2008/07/13 19:01:35 rlubke Exp $
+ */
+public abstract class TagHandler implements FaceletHandler
+{
+    protected final String tagId;
+
+    protected final Tag tag;
+
+    protected final FaceletHandler nextHandler;
+
+    public TagHandler(TagConfig config)
+    {
+        this.tagId = config.getTagId();
+        this.tag = config.getTag();
+        this.nextHandler = config.getNextHandler();
+    }
+
+    /**
+     * Utility method for fetching the appropriate TagAttribute
+     * 
+     * @param localName
+     *            name of attribute
+     * @return TagAttribute if found, otherwise null
+     */
+    protected final TagAttribute getAttribute(String localName)
+    {
+        return this.tag.getAttributes().get(localName);
+    }
+
+    /**
+     * Utility method for fetching a required TagAttribute
+     * 
+     * @param localName
+     *            name of the attribute
+     * @return TagAttribute if found, otherwise error
+     * @throws TagException
+     *             if the attribute was not found
+     */
+    protected final TagAttribute getRequiredAttribute(String localName) throws TagException
+    {
+        TagAttribute attr = this.getAttribute(localName);
+        if (attr == null)
+        {
+            throw new TagException(this.tag, "Attribute '" + localName + "' is required");
+        }
+        
+        return attr;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String toString()
+    {
+        return this.tag.toString();
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegate.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegate.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegate.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,37 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.view.facelets.FaceletContext;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-15 17:16:04 -0400 (mer., 17 sept. 2008) $
+ * 
+ * @since 2.0
+ */
+public abstract class TagHandlerDelegate
+{
+    public abstract void apply(FaceletContext ctx, UIComponent comp) throws IOException;
+    
+    public abstract MetaRuleset createMetaRuleset(Class<?> type);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegateFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegateFactory.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegateFactory.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TagHandlerDelegateFactory.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,36 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-15 17:12:29 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public abstract class TagHandlerDelegateFactory
+{
+    public abstract TagHandlerDelegate createBehaviorHandlerDelegate(BehaviorHandler owner);
+    
+    public abstract TagHandlerDelegate createComponentHandlerDelegate(ComponentHandler owner);
+    
+    public abstract TagHandlerDelegate createConverterHandlerDelegate(ConverterHandler owner);
+    
+    public abstract TagHandlerDelegate createValidatorHandlerDelegate(ValidatorHandler owner);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TextHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TextHandler.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TextHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/TextHandler.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,34 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.facelets.FaceletContext;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-21 09:24:27 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public interface TextHandler
+{
+    public String getText();
+    
+    public String getText(FaceletContext ctx);
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorConfig.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorConfig.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorConfig.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,30 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-15 15:58:51 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public interface ValidatorConfig extends TagConfig
+{
+    public String getValidatorId();
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorHandler.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorHandler.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/view/facelets/ValidatorHandler.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,53 @@
+/*
+ * 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 javax.faces.view.facelets;
+
+import javax.faces.view.EditableValueHolderAttachedObjectHandler;
+import javax.faces.view.facelets.FaceletContext;
+
+/**
+ * Handles setting a Validator instance on a EditableValueHolder. Will wire all attributes set to the Validator instance
+ * created/fetched. Uses the "binding" attribute for grabbing instances to apply attributes to. <p/> Will only
+ * set/create Validator is the passed UIComponent's parent is null, signifying that it wasn't restored from an existing
+ * tree.
+ * 
+ * @author Jacob Hookom
+ * @version $Id: ValidateHandler.java,v 1.4 2008/07/13 19:01:46 rlubke Exp $
+ */
+public class ValidatorHandler extends FaceletsAttachedObjectHandler implements EditableValueHolderAttachedObjectHandler
+{
+    public ValidatorHandler(ValidatorConfig config)
+    {
+        super(config);
+
+        // TODO: IMPLEMENT HERE
+    }
+
+    public String getValidatorId(FaceletContext ctx)
+    {
+        // TODO: IMPLEMENT HERE
+        return null;
+    }
+
+    protected TagHandlerDelegate getTagHandlerHelper()
+    {
+        // TODO: IMPLEMENT HERE
+        return null;
+    }
+}

Added: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java?rev=761981&view=auto
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java (added)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java Sat Apr  4 18:44:14 2009
@@ -0,0 +1,50 @@
+/*
+ * 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 javax.faces.webapp;
+
+import javax.faces.context.ExceptionHandler;
+import javax.faces.context.ExceptionHandlerFactory;
+
+/**
+ * @author Simon Lessard (latest modification by $Author: slessard $)
+ * @version $Revision: 696523 $ $Date: 2009-03-14 20:06:50 -0400 (mer., 17 sept. 2008) $
+ *
+ * @since 2.0
+ */
+public class PreJsf2ExceptionHandlerFactory extends ExceptionHandlerFactory
+{
+
+    /**
+     * 
+     */
+    public PreJsf2ExceptionHandlerFactory()
+    {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ExceptionHandler getExceptionHandler()
+    {
+        // TODO: IMPLEMENT HERE
+        return null;
+    }
+
+}

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java?rev=761981&r1=761980&r2=761981&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java Sat Apr  4 18:44:14 2009
@@ -794,6 +794,14 @@
         else
         {
             viewComponentIds = (Map<String, Object>)requestMap.get(VIEW_IDS);
+            
+            // Check if null, this can happen if someone programatically tries to do an include of a 
+            // JSP fragment. This code will prevent NullPointerException from happening in such cases.
+            if (viewComponentIds == null)
+            {
+                viewComponentIds = new HashMap<String, Object>();
+                requestMap.put(VIEW_IDS, viewComponentIds);
+            }
         }
 
         return viewComponentIds;