You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2010/01/21 18:34:25 UTC

svn commit: r901788 - in /myfaces/extensions/scripting/trunk: core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ core/myfaces2-extensions/src/main/resources/META-INF/ examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/o...

Author: werpu
Date: Thu Jan 21 17:34:23 2010
New Revision: 901788

URL: http://svn.apache.org/viewvc?rev=901788&view=rev
Log:
https://issues.apache.org/jira/browse/EXTSCRIPT-47
finishing works on the tag handler section so that the component attributes can be added on the fly.

Added:
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ComponentRule.java   (with props)
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/InvokeDynamicBeanPropertyTagRule.java   (with props)
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReloadingComponentTagHandlerDelegate.java   (with props)
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingBeanPropertyTagRule.java   (with props)
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingMetarulesetImpl.java   (with props)
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/TagHandlerDelegateFactoryImpl.java   (with props)
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/componentTest.xhtml
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/gradient1.jpg
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-a-moon-light.jpg
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-blue-rays.jpg
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/license.txt   (with props)
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/template2.xhtml
Modified:
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/resources/META-INF/faces-config.xml
    myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/test/TestRenderer.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/Blog.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/Blog.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestComponent.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/blog.xhtml
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/javablog.xhtml
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/styles/main.css

Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ComponentRule.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ComponentRule.java?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ComponentRule.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ComponentRule.java Thu Jan 21 17:34:23 2010
@@ -0,0 +1,102 @@
+package org.apache.myfaces.scripting.facelet;
+
+import javax.faces.component.UIComponent;
+import javax.faces.view.facelets.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: werpu2
+ * Date: 21.01.2010
+ * Time: 16:06:23
+ * To change this template use File | Settings | File Templates.
+ */
+final class ComponentRule extends MetaRule
+{
+
+    final class LiteralAttributeMetadata extends Metadata
+    {
+        private final String _name;
+        private final String _value;
+
+        public LiteralAttributeMetadata(String name, String value)
+        {
+            _name = name;
+            _value = value;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance)
+        {
+            ((UIComponent) instance).getAttributes().put(_name, _value);
+        }
+    }
+
+    final static class ValueExpressionMetadata extends Metadata
+    {
+        private final String _name;
+
+        private final TagAttribute _attr;
+
+        private final Class<?> _type;
+
+        public ValueExpressionMetadata(String name, Class<?> type, TagAttribute attr)
+        {
+            _name = name;
+            _attr = attr;
+            _type = type;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance)
+        {
+            ((UIComponent) instance).setValueExpression(_name, _attr.getValueExpression(ctx, _type));
+        }
+    }
+
+    //private final static Logger log = Logger.getLogger("facelets.tag.component");
+    private final static Logger log = Logger.getLogger(ComponentRule.class.getName());
+
+    public final static ComponentRule Instance = new ComponentRule();
+
+    public ComponentRule()
+    {
+        super();
+    }
+
+    public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta)
+    {
+        if (meta.isTargetInstanceOf(UIComponent.class))
+        {
+            // if component and dynamic, then must set expression
+            if (!attribute.isLiteral())
+            {
+                Class<?> type = meta.getPropertyType(name);
+                if (type == null)
+                {
+                    type = Object.class;
+                }
+
+                return new ValueExpressionMetadata(name, type, attribute);
+            }
+            else if (meta.getWriteMethod(name) == null)
+            {
+
+                // this was an attribute literal, but not property
+                warnAttr(attribute, meta.getTargetClass(), name);
+
+                return new LiteralAttributeMetadata(name, attribute.getValue());
+            }
+        }
+        return null;
+    }
+
+    private static void warnAttr(TagAttribute attr, Class<?> type, String n)
+    {
+        if (log.isLoggable(Level.FINER))
+        {
+            log.finer(attr + " Property '" + n + "' is not on type: " + type.getName());
+        }
+    }
+
+}
+

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ComponentRule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ComponentRule.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/InvokeDynamicBeanPropertyTagRule.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/InvokeDynamicBeanPropertyTagRule.java?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/InvokeDynamicBeanPropertyTagRule.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/InvokeDynamicBeanPropertyTagRule.java Thu Jan 21 17:34:23 2010
@@ -0,0 +1,88 @@
+package org.apache.myfaces.scripting.facelet;
+
+import org.apache.myfaces.scripting.core.util.ReflectUtil;
+
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.Metadata;
+import javax.faces.view.facelets.MetadataTarget;
+import javax.faces.view.facelets.TagAttribute;
+import java.lang.reflect.Method;
+
+/**
+ * We have to introduce a BeanPropertyTagRule
+ * which calls the setter of a given component
+ * on a weaker base than the original facelets component
+ * property tag rule does.
+ * By not enforcing a strict per object/class policy on calling
+ * the setter we are able to reload the classes on the fly
+ * <p/>
+ * the original approach was to cache the classes, and then
+ * call the invoke method on the existing class
+ * if we now exchange the classes we have a problem...
+ * By making the invocation of the method independend from the underlying
+ * class (sort of calling an invokedynamic) we can bypass this problem
+ * on facelets level.
+ */
+public class InvokeDynamicBeanPropertyTagRule {
+    public final static InvokeDynamicBeanPropertyTagRule Instance = new InvokeDynamicBeanPropertyTagRule();
+
+    public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+        Method m = meta.getWriteMethod(name);
+
+        // if the property is writable
+        if (m != null) {
+            if (attribute.isLiteral()) {
+                return new LiteralPropertyMetadata(m, attribute);
+            } else {
+                return new DynamicPropertyMetadata(m, attribute);
+            }
+        }
+
+        return null;
+    }
+
+    final static class LiteralPropertyMetadata extends Metadata {
+
+        private final Method method;
+
+        private final TagAttribute attribute;
+
+        private Object[] value;
+
+        public LiteralPropertyMetadata(Method method, TagAttribute attribute) {
+            this.method = method;
+            this.attribute = attribute;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            if (value == null) {
+                String str = this.attribute.getValue();
+                value = new Object[]{ctx.getExpressionFactory().coerceToType(str, method.getParameterTypes()[0])};
+            }
+            //What we do here is simply to call an invoke dynamic on the method with the same name
+            //but on the new instance of, that way we can bypass class problems
+            //because the method reference has stored the old class in our case
+            ReflectUtil.executeMethod(instance, method.getName(), this.value);
+        }
+
+    }
+
+    final static class DynamicPropertyMetadata extends Metadata {
+
+        private final Method method;
+
+        private final TagAttribute attribute;
+
+        private final Class<?> type;
+
+        public DynamicPropertyMetadata(Method method, TagAttribute attribute) {
+            this.method = method;
+            this.type = method.getParameterTypes()[0];
+            this.attribute = attribute;
+        }
+
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            ReflectUtil.executeMethod(instance, method.getName(), new Object[]{attribute.getObject(ctx, type)});
+        }
+    }
+}

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/InvokeDynamicBeanPropertyTagRule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/InvokeDynamicBeanPropertyTagRule.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReloadingComponentTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReloadingComponentTagHandlerDelegate.java?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReloadingComponentTagHandlerDelegate.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReloadingComponentTagHandlerDelegate.java Thu Jan 21 17:34:23 2010
@@ -0,0 +1,80 @@
+package org.apache.myfaces.scripting.facelet;
+
+import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
+import org.apache.myfaces.view.facelets.tag.jsf.*;
+
+import javax.faces.component.ActionSource;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.view.facelets.*;
+import javax.faces.view.facelets.ComponentHandler;
+import java.io.IOException;
+
+/**
+ * we provide our own component tag handler factory impl
+ * so that we can deal with refreshing of components
+ * on Facelets level without running into
+ * nasty type exceptions
+ */
+public class ReloadingComponentTagHandlerDelegate extends TagHandlerDelegate {
+
+    ComponentHandler _owner;
+    TagHandlerDelegate _delegate;
+
+    public ReloadingComponentTagHandlerDelegate(ComponentHandler owner) {
+        _owner = owner;
+        _delegate = new ComponentTagHandlerDelegate(owner);
+    }
+
+    @Override
+    public void apply(FaceletContext ctx, UIComponent comp) throws IOException {
+        if (WeavingContext.isDynamic(comp.getClass())) {
+            //TODO hook our own component code in here
+        }
+        if (comp.getClass().getName().contains("JavaTestComponent")) {
+            System.out.println("Debugpoint found");
+        }
+
+        _delegate.apply(ctx, comp);
+    }
+
+    public MetaRuleset createMetaRuleset(Class type) {
+        //We have to create a different meta rule set for dynamic classes
+        //which have weaver instantiation criteria, the original meta rule set
+        //first applies the attributes and then calls BeanPropertyTagRule on our
+        //that one however caches the current method and does not take into consideration
+        //that classes can be changed on the fly
+
+       // if (WeavingContext.isDynamic(type)) {
+            MetaRuleset m = new SwitchingMetarulesetImpl(_owner.getTag(), type);
+            // ignore standard component attributes
+            m.ignore("binding").ignore("id");
+
+            // add auto wiring for attributes
+            m.addRule(ComponentRule.Instance);
+
+            // if it's an ActionSource
+            if (ActionSource.class.isAssignableFrom(type)) {
+                m.addRule(ActionSourceRule.Instance);
+            }
+
+            // if it's a ValueHolder
+            if (ValueHolder.class.isAssignableFrom(type)) {
+                m.addRule(ValueHolderRule.Instance);
+
+                // if it's an EditableValueHolder
+                if (EditableValueHolder.class.isAssignableFrom(type)) {
+                    m.ignore("submittedValue");
+                    m.ignore("valid");
+                    m.addRule(EditableValueHolderRule.Instance);
+                }
+            }
+
+            return m;
+        //}
+
+        //return _delegate.createMetaRuleset(type);
+    }
+}

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReloadingComponentTagHandlerDelegate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/ReloadingComponentTagHandlerDelegate.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingBeanPropertyTagRule.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingBeanPropertyTagRule.java?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingBeanPropertyTagRule.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingBeanPropertyTagRule.java Thu Jan 21 17:34:23 2010
@@ -0,0 +1,33 @@
+package org.apache.myfaces.scripting.facelet;
+
+import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.view.facelets.tag.BeanPropertyTagRule;
+
+import javax.faces.view.facelets.MetaRule;
+import javax.faces.view.facelets.Metadata;
+import javax.faces.view.facelets.MetadataTarget;
+import javax.faces.view.facelets.TagAttribute;
+
+/**
+ * Bean property tag rule
+ * which switches between the fast static
+ * version and the slower invoke dynamic
+ * version depending on the class type of
+ * the incoming instance
+ */
+public class SwitchingBeanPropertyTagRule extends MetaRule {
+
+    InvokeDynamicBeanPropertyTagRule _invokeDynamic = InvokeDynamicBeanPropertyTagRule.Instance;
+    BeanPropertyTagRule _invokeStatic = BeanPropertyTagRule.Instance;
+
+    public static volatile SwitchingBeanPropertyTagRule Instance = new SwitchingBeanPropertyTagRule();
+
+    @Override
+    public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+        if (WeavingContext.isDynamic(meta.getTargetClass())) {
+            return _invokeDynamic.applyRule(name, attribute, meta);
+        } else {
+            return _invokeStatic.applyRule(name, attribute, meta);
+        }
+    }
+}

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingBeanPropertyTagRule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingBeanPropertyTagRule.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingMetarulesetImpl.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingMetarulesetImpl.java?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingMetarulesetImpl.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingMetarulesetImpl.java Thu Jan 21 17:34:23 2010
@@ -0,0 +1,162 @@
+package org.apache.myfaces.scripting.facelet;
+
+import org.apache.myfaces.view.facelets.tag.BeanPropertyTagRule;
+import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
+import org.apache.myfaces.view.facelets.tag.MetadataImpl;
+import org.apache.myfaces.view.facelets.tag.MetadataTargetImpl;
+import org.apache.myfaces.view.facelets.util.ParameterCheck;
+
+import javax.faces.view.facelets.*;
+import java.beans.IntrospectionException;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * we have to to do a full reimplementation of the rule set
+ * because otherwise we could not plant the switching bean reloading
+ * rule due to private props in the original code
+ */
+public class SwitchingMetarulesetImpl extends MetaRuleset {
+    private final static Metadata NONE = new NullMetadata();
+
+    //private final static Logger log = Logger.getLogger("facelets.tag.meta");
+    private final static Logger log = Logger.getLogger(MetaRulesetImpl.class.getName());
+
+    private final static WeakHashMap<String, MetadataTarget> _metadata = new WeakHashMap<String, MetadataTarget>();
+
+    private final Map<String, TagAttribute> _attributes;
+
+    private final List<Metadata> _mappers;
+
+    private final List<MetaRule> _rules;
+
+    private final Tag _tag;
+
+    private final Class<?> _type;
+
+    public SwitchingMetarulesetImpl(Tag tag, Class<?> type) {
+        _tag = tag;
+        _type = type;
+        _attributes = new HashMap<String, TagAttribute>();
+        _mappers = new ArrayList<Metadata>();
+        _rules = new ArrayList<MetaRule>();
+
+        // setup attributes
+        for (TagAttribute attribute : _tag.getAttributes().getAll()) {
+            _attributes.put(attribute.getLocalName(), attribute);
+        }
+
+        // add default rules
+        _rules.add(SwitchingBeanPropertyTagRule.Instance);
+    }
+
+    public MetaRuleset add(Metadata mapper) {
+        ParameterCheck.notNull("mapper", mapper);
+
+        if (!_mappers.contains(mapper)) {
+            _mappers.add(mapper);
+        }
+
+        return this;
+    }
+
+    public MetaRuleset addRule(MetaRule rule) {
+        ParameterCheck.notNull("rule", rule);
+
+        _rules.add(rule);
+
+        return this;
+    }
+
+    public MetaRuleset alias(String attribute, String property) {
+        ParameterCheck.notNull("attribute", attribute);
+        ParameterCheck.notNull("property", property);
+
+        TagAttribute attr = (TagAttribute) _attributes.remove(attribute);
+        if (attr != null) {
+            _attributes.put(property, attr);
+        }
+
+        return this;
+    }
+
+    public Metadata finish() {
+        assert !_rules.isEmpty();
+
+        if (!_attributes.isEmpty()) {
+            MetadataTarget target = this._getMetadataTarget();
+            int ruleEnd = _rules.size() - 1;
+
+            // now iterate over attributes
+            for (Map.Entry<String, TagAttribute> entry : _attributes.entrySet()) {
+                Metadata data = null;
+
+                int i = ruleEnd;
+
+                // First loop is always safe
+                do {
+                    MetaRule rule = _rules.get(i);
+                    data = rule.applyRule(entry.getKey(), entry.getValue(), target);
+                    i--;
+                } while (data == null && i >= 0);
+
+                if (data == null) {
+                    if (log.isLoggable(Level.SEVERE)) {
+                        log.severe(entry.getValue() + " Unhandled by MetaTagHandler for type " + _type.getName());
+                    }
+                } else {
+                    _mappers.add(data);
+                }
+            }
+        }
+
+        if (_mappers.isEmpty()) {
+            return NONE;
+        } else {
+            return new MetadataImpl(_mappers.toArray(new Metadata[_mappers.size()]));
+        }
+    }
+
+    public MetaRuleset ignore(String attribute) {
+        ParameterCheck.notNull("attribute", attribute);
+
+        _attributes.remove(attribute);
+
+        return this;
+    }
+
+    public MetaRuleset ignoreAll() {
+        _attributes.clear();
+
+        return this;
+    }
+
+    private final MetadataTarget _getMetadataTarget() {
+        String key = _type.getName();
+
+        MetadataTarget meta = _metadata.get(key);
+        if (meta == null) {
+            try {
+                meta = new MetadataTargetImpl(_type);
+            }
+            catch (IntrospectionException e) {
+                throw new TagException(_tag, "Error Creating TargetMetadata", e);
+            }
+
+            _metadata.put(key, meta);
+        }
+
+        return meta;
+    }
+
+    private static class NullMetadata extends Metadata {
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void applyMetadata(FaceletContext ctx, Object instance) {
+            // do nothing
+        }
+    }
+}

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingMetarulesetImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/SwitchingMetarulesetImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/TagHandlerDelegateFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/TagHandlerDelegateFactoryImpl.java?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/TagHandlerDelegateFactoryImpl.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/TagHandlerDelegateFactoryImpl.java Thu Jan 21 17:34:23 2010
@@ -0,0 +1,48 @@
+package org.apache.myfaces.scripting.facelet;
+
+import org.apache.myfaces.view.facelets.tag.jsf.BehaviorTagHandlerDelegate;
+import org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate;
+import org.apache.myfaces.view.facelets.tag.jsf.ConverterTagHandlerDelegate;
+import org.apache.myfaces.view.facelets.tag.jsf.ValidatorTagHandlerDelegate;
+
+import javax.faces.view.facelets.BehaviorHandler;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.ConverterHandler;
+import javax.faces.view.facelets.TagHandlerDelegate;
+import javax.faces.view.facelets.TagHandlerDelegateFactory;
+import javax.faces.view.facelets.ValidatorHandler;
+
+
+public class TagHandlerDelegateFactoryImpl extends TagHandlerDelegateFactory
+{
+
+    @Override
+    public TagHandlerDelegate createBehaviorHandlerDelegate(
+            BehaviorHandler owner)
+    {
+        return new BehaviorTagHandlerDelegate(owner);
+    }
+
+    @Override
+    public TagHandlerDelegate createComponentHandlerDelegate(
+            ComponentHandler owner)
+    {
+        return new ReloadingComponentTagHandlerDelegate(owner);
+    }
+
+    @Override
+    public TagHandlerDelegate createConverterHandlerDelegate(
+            ConverterHandler owner)
+    {
+        return new ConverterTagHandlerDelegate(owner);
+    }
+
+    @Override
+    public TagHandlerDelegate createValidatorHandlerDelegate(
+            ValidatorHandler owner)
+    {
+        return new ValidatorTagHandlerDelegate(owner);
+    }
+
+}
+

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/TagHandlerDelegateFactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/facelet/TagHandlerDelegateFactoryImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/resources/META-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/resources/META-INF/faces-config.xml?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/resources/META-INF/faces-config.xml (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/resources/META-INF/faces-config.xml Thu Jan 21 17:34:23 2010
@@ -40,6 +40,11 @@
         <render-kit-factory>
             org.apache.myfaces.scripting.jsf.dynamicdecorators.factories.ScriptingRenderkitFactory
         </render-kit-factory>
+        <tag-handler-delegate-factory>
+            org.apache.myfaces.scripting.facelet.TagHandlerDelegateFactoryImpl
+        </tag-handler-delegate-factory>
+
+
     </factory>
 
     <application>

Modified: myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/test/TestRenderer.groovy
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/test/TestRenderer.groovy?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/test/TestRenderer.groovy (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces12-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/test/TestRenderer.groovy Thu Jan 21 17:34:23 2010
@@ -20,7 +20,8 @@
 
 import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTextRendererBase
 import javax.faces.context.FacesContext
-import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponent
+import javax.faces.context.ResponseWriter;
 
 
 /**
@@ -32,7 +33,7 @@
 
     
         facesContext.responseWriter.write """
-            <h1> sss Hello from a groovy JSF components renderer </h1>
+            <h1> Hello from a groovy JSF components renderer </h1>
 
             <p> you can find my sources under WEB-INF/groovy/... </p>
 
@@ -52,11 +53,12 @@
 
             Test for attribute: $uiComponent.testattr
         """
-        
+
+        //hello(facesContext.responseWriter)
+
         super.encodeBegin(facesContext, uiComponent);    //To change body of overridden methods use File | Settings | File Templates.
     }
 
-    
 
     public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) {
         print super.toString()

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml Thu Jan 21 17:34:23 2010
@@ -21,6 +21,8 @@
               xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
               version = "2.0">
+
+
     <!-- managed beans of the simple hello world app -->
     <managed-bean>
         <managed-bean-name>helloWorld</managed-bean-name>

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/Blog.groovy
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/Blog.groovy?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/Blog.groovy (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/Blog.groovy Thu Jan 21 17:34:23 2010
@@ -26,10 +26,8 @@
 import javax.faces.bean.SessionScoped
 import javax.faces.bean.RequestScoped;
 
-
 @ManagedBean(name = "blogView")
 @RequestScoped
-  
 public class Blog {
     //bug application and session scoped beans  are not refreshed structurally yet
 

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/groovy/org/apache/myfaces/groovyloader/blog/BlogEntry.groovy Thu Jan 21 17:34:23 2010
@@ -22,7 +22,7 @@
  * The entry class 
  */
 public class BlogEntry {
-
+  
     String firstName = ""
     String lastName = ""
     String topic = ""

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/Blog.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/Blog.java?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/Blog.java (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/Blog.java Thu Jan 21 17:34:23 2010
@@ -29,6 +29,7 @@
  * @date: 01.09.2009
  */
 
+
 public class Blog {
 
     String title        =   "Hello to the myfaces dynamic blogging example";

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/blog/BlogEntry.java Thu Jan 21 17:34:23 2010
@@ -24,7 +24,6 @@
  */
 public class BlogEntry {
 
-    
     String firstName = "";
     String lastName = "";
     String topic = "";

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestComponent.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestComponent.java?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestComponent.java (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestComponent.java Thu Jan 21 17:34:23 2010
@@ -108,7 +108,7 @@
 
 
     enum PropertyKeys {
-        inc, testAttr, testAttr2
+        inc, testAttr, testAttr2, testAttr3
     }
 
     public JavaTestComponent() {
@@ -140,11 +140,19 @@
         getStateHelper().put(PropertyKeys.testAttr, testAttr);
     }
 
-      public String getTestAttr2() {
-        return (String) getStateHelper().eval(PropertyKeys.testAttr, "");
+    public String getTestAttr2x() {
+        return (String) getStateHelper().eval(PropertyKeys.testAttr2, "");
     }
 
-    public void setTestAttr2(String testAttr) {
+    public void setTestAttr2x(String testAttr) {
         getStateHelper().put(PropertyKeys.testAttr2, testAttr);
     }
+
+      public String getTestAttr3() {
+        return (String) getStateHelper().eval(PropertyKeys.testAttr3, "");
+    }
+
+    public void setTestAttr3(String testAttr) {
+        getStateHelper().put(PropertyKeys.testAttr3, testAttr);
+    }
 }

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java Thu Jan 21 17:34:23 2010
@@ -46,21 +46,25 @@
 
     static Log log = LogFactory.getLog(JavaTestRenderer1.class);
 
-    private static final String MSG2 = "Hello world from Renderer 1";
+    private static final String MSG2 = "aaaa Hello world from Renderer 1";
 
     public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
         super.encodeBegin(context, component);
         JavaTestComponent myComponent = (JavaTestComponent) component;
 
         ResponseWriter writer = context.getResponseWriter();
-        writer.write(MSG2);
-        writer.write(myComponent.getMarker());
-        writer.write("<h1/>hello world "+myComponent.getTestAttr()+"</h1>");
+        test(myComponent, writer);
         
         //hello(writer);
         writer.flush();
     }
-    
+
+    private void test(JavaTestComponent myComponent, ResponseWriter writer) throws IOException {
+        writer.write(MSG2);
+        writer.write(myComponent.getMarker());
+        writer.write("<h1/>TestAttr: "+myComponent.getTestAttr()+" | "+myComponent.getTestAttr3()+"</h1>");
+    }
+
     public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
         log.info("JavaTestRenderer1.encodeEnd");
     }

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/blog.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/blog.xhtml?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/blog.xhtml (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/blog.xhtml Thu Jan 21 17:34:23 2010
@@ -1,39 +1,53 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns = "http://www.w3.org/1999/xhtml" xmlns:ui = "http://java.sun.com/jsf/facelets"
-      xmlns:f = "http://java.sun.com/jsf/core" xmlns:h = "http://java.sun.com/jsf/html"
-      xmlns:t = "http://myfaces.apache.org/tomahawk" xmlns:grv = "http://myfaces.apache.org/groovy">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:grv="http://myfaces.apache.org/groovy">
 <head>
     <title>Hello World</title>
 </head>
 <body>
-<ui:composition template = "/template.xhtml">
+<ui:composition template="/template.xhtml">
 
-    <ui:define name = "body">
-        <h:form id = "form">
-            <h:panelGrid id = "grid" columns = "1">
-                <h:outputText id = "title1" styleClass = "title" value = "#{blogView.title}" />
-                <h:outputText id = "title11" styleClass = "title1" value = "#{blogView.title1}" />
-                <!--
-                entry.firstName = firstName
-                entry.lastName = lastName
-                entry.topic = topic
-                entry.content = content
-            -->
-                <h:outputText value = "First Name" /><h:inputText value = "#{blogView.firstName}" />
-                <h:outputText value = "Last Name" /><h:inputText value = "#{blogView.lastName}" />
-                <h:outputText value = "Topic of entry" /><h:inputText value = "#{blogView.topic}" />
-                <h:outputText value = "Content" /><h:inputText value = "#{blogView.content}" />
+    <ui:define name="body">
+        <h:form id="form">
+            <h:panelGroup styleClass="stdBox">
+                <h:panelGrid id="grid" columns="1">
+                    <h:outputText id="title1" styleClass="title" value="#{blogView.title}"/>
+                    <h:outputText id="title11" styleClass="title1" value="#{blogView.title1}"/>
+                    <!--
+                        entry.firstName = firstName
+                        entry.lastName = lastName
+                        entry.topic = topic
+                        entry.content = content
+                    -->
+                    <h:outputText value="First Name"/>
+                    <h:inputText value="#{blogView.firstName}"/>
+                    <h:outputText value="Last Name"/>
+                    <h:inputText value="#{blogView.lastName}"/>
+                    <h:outputText value="Topic of entry"/>
+                    <h:inputText value="#{blogView.topic}"/>
+                    <h:outputText value="Content"/>
+                    <h:inputText value="#{blogView.content}"/>
 
 
-                <h:commandLink action = "#{blogView.addEntry}" value = "Add Blog" />
-            </h:panelGrid>
-            <h:panelGrid columns = "1">
-                <h:outputText value = "Blog Entries" />
-                <ui:repeat value = "#{blogService.blogEntries}" var = "item">
-                    
-                    <h:outputText value = "#{item.topic}" />
-                    <h:outputText value = "#{item.content}" /><br />
+                    <h:commandLink action="#{blogView.addEntry}" value="Add Blog"/>
+                </h:panelGrid>
+            </h:panelGroup>
+
+            <h:panelGrid columns="1">
+                <h:panelGroup>
+                <h3><h:outputText value="Blog Entries"/></h3>
+                </h:panelGroup>
+                <ui:repeat value="#{blogService.blogEntries}" var="item">
+                    <h:panelGroup styleClass="stdBox">
+                        Topic:
+                        <h:outputText value="#{item.topic}"/>
+                        <br/>
+                        Content:
+                        <h:outputText value="#{item.content}"/>
+                    </h:panelGroup>
+                    <br />
                 </ui:repeat>
             </h:panelGrid>
 

Added: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/componentTest.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/componentTest.xhtml?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/componentTest.xhtml (added)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/componentTest.xhtml Thu Jan 21 17:34:23 2010
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:grv="http://myfaces.apache.org/groovy">
+<head>
+    <title>Hello World</title>
+</head>
+<body>
+<ui:composition template="/template2.xhtml">
+    <ui:define name="body">
+        <grv:testcomponent2 testAttr="vvv" testAttr3="Attribute 3 set"/>
+    </ui:define>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml Thu Jan 21 17:34:23 2010
@@ -8,8 +8,6 @@
 </head>
 <body>
 <ui:composition template="/template.xhtml">
-
-
     <ui:define name="body">
         <h:form id="form">
             <h:panelGrid id="grid" columns="1">
@@ -47,10 +45,7 @@
                     <h3>Java Component</h3>
                     <grv:testcomponent2 testAttr="vvv" testAttr2="zzz"/>
                 </h:panelGroup>
-
             </h:panelGrid>
-
-
         </h:form>
     </ui:define>
 </ui:composition>

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/javablog.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/javablog.xhtml?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/javablog.xhtml (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/javablog.xhtml Thu Jan 21 17:34:23 2010
@@ -1,43 +1,57 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns = "http://www.w3.org/1999/xhtml" xmlns:ui = "http://java.sun.com/jsf/facelets"
-      xmlns:f = "http://java.sun.com/jsf/core" xmlns:h = "http://java.sun.com/jsf/html"
-      xmlns:t = "http://myfaces.apache.org/tomahawk" xmlns:grv = "http://myfaces.apache.org/groovy">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:grv="http://myfaces.apache.org/groovy">
 <head>
     <title>Hello World</title>
 </head>
 <body>
-<ui:composition template = "/template.xhtml">
+<ui:composition template="/template.xhtml">
 
-    <ui:define name = "body">
-        <h:form id = "form">
-            <h:panelGrid id = "grid" columns = "1">
-                <h:outputText id = "title1" styleClass = "title" value = "#{javaBlogView.title}" />
-                <h:outputText id = "title11" styleClass = "title1" value = "#{javaBlogView.title1}" />
+    <ui:define name="body">
+        <h:form id="form">
+            <h:panelGrid id="grid" columns="1" styleClass="stdBox">
+                <h:outputText id="title1" styleClass="title" value="#{javaBlogView.title}"/>
+                <h:outputText id="title11" styleClass="title1" value="#{javaBlogView.title1}"/>
                 <!--
                 entry.firstName = firstName
                 entry.lastName = lastName
                 entry.topic = topic
                 entry.content = content
             -->
-                <h:outputText value = "First Name" /><h:inputText value = "#{javaBlogView.firstName}" />
-                <h:outputText value = "Last Name" /><h:inputText value = "#{javaBlogView.lastName}" />
-                <h:outputText value = "Topic of entry" /><h:inputText value = "#{javaBlogView.topic}" />
-                <h:outputText value = "Content" /><h:inputText value = "#{javaBlogView.content}" />
+                <h:outputText value="First Name"/>
+                <h:inputText value="#{javaBlogView.firstName}"/>
+                <h:outputText value="Last Name"/>
+                <h:inputText value="#{javaBlogView.lastName}"/>
+                <h:outputText value="Topic of entry"/>
+                <h:inputText value="#{javaBlogView.topic}"/>
+                <h:outputText value="Content"/>
+                <h:inputText value="#{javaBlogView.content}"/>
 
 
-                <h:outputText value="#{javaBlogView.title3}" />
+                <h:outputText value="#{javaBlogView.title3}"/>
 
-                <h:outputText value="#{javaBlogView.title4}" />
-                
+                <h:outputText value="#{javaBlogView.title4}"/>
 
-                <h:commandLink action = "#{javaBlogView.addEntry2}" value = "Add Blog" />
+
+                <h:commandLink action="#{javaBlogView.addEntry2}" value="Add Blog"/>
             </h:panelGrid>
-            <h:panelGrid columns = "1">
-                <h:outputText value = "Blog Entries" />
-                <ui:repeat value = "#{javaBlogService.blogEntries}" var = "item">
-                    <h:outputText value = "#{item.topic}" />
-                    <h:outputText value = "#{item.content}" /><br />
+            <h:panelGrid columns="1">
+                <h:panelGroup>
+                    <h3>
+                        <h:outputText value="Blog Entries"/>
+                    </h3>
+                </h:panelGroup>
+                <ui:repeat value="#{javaBlogService.blogEntries}" var="item">
+                    <h:panelGrid columns="2" styleClass="stdBox">
+                        <h:outputLabel value="Topic"/>
+                        <h:outputText value="#{item.topic}"/>
+                        <h:outputLabel value="Content"/>
+                        <h:outputText value="#{item.content}"/>
+
+                    </h:panelGrid>
+                    <br />
                 </ui:repeat>
             </h:panelGrid>
 

Added: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/gradient1.jpg
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/gradient1.jpg?rev=901788&view=auto
==============================================================================
Files myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/gradient1.jpg (added) and myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/gradient1.jpg Thu Jan 21 17:34:23 2010 differ

Added: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-a-moon-light.jpg
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-a-moon-light.jpg?rev=901788&view=auto
==============================================================================
Files myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-a-moon-light.jpg (added) and myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-a-moon-light.jpg Thu Jan 21 17:34:23 2010 differ

Added: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-blue-rays.jpg
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-blue-rays.jpg?rev=901788&view=auto
==============================================================================
Files myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-blue-rays.jpg (added) and myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/illustration-of-blue-rays.jpg Thu Jan 21 17:34:23 2010 differ

Added: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/license.txt
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/license.txt?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/license.txt (added)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/license.txt Thu Jan 21 17:34:23 2010
@@ -0,0 +1,2 @@
+illustration-moonlight from http://www.public-domain-image.com/backgrounds/slides/illustration-of-a-moon-light.html
+illustration-of-blue rays from http://www.public-domain-image.com/backgrounds/slides/illustration-of-blue-rays.html

Propchange: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/license.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/img/license.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/styles/main.css
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/styles/main.css?rev=901788&r1=901787&r2=901788&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/styles/main.css (original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/resources/styles/main.css Thu Jan 21 17:34:23 2010
@@ -1,3 +1,8 @@
+body {
+    background-image:url("../resources/img/gradient1.jpg");
+    background-repeat:repeat-x;
+}
+
 #hello {
     background-color: yellow;
 }
@@ -7,6 +12,7 @@
     background-color: white;
     border: 1px solid black;
     -moz-border-radius: 5px;
+    padding: 5px;
     border-radius: 5px;
 }
 

Added: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/template2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/template2.xhtml?rev=901788&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/template2.xhtml (added)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/template2.xhtml Thu Jan 21 17:34:23 2010
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:grv="http://myfaces.apache.org/groovy"
+      xmlns:h="http://java.sun.com/jsf/html">
+<head>
+
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+    <title>Myfaces Example Facelets</title>
+
+    <link type="text/css" rel="stylesheet" href="#{resource['styles:main.css']}"/>
+</head>
+
+<body>
+<h1>
+    <ui:insert name="title">Myfaces Example Facelets</ui:insert>
+</h1>
+<p>
+    <ui:insert name="body">Hello World Example!</ui:insert>
+</p>
+</body>
+</html>
\ No newline at end of file