FAQ
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ActionSourceRule.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ActionSourceRule.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ActionSourceRule.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ActionSourceRule.java Thu Feb 12 01:23:54 2009
@@ -18,18 +18,17 @@
*/
package com.sun.facelets.tag.jsf;

+import javax.el.MethodExpression;
import javax.faces.component.ActionSource;
import javax.faces.component.ActionSource2;
import javax.faces.event.ActionEvent;
import javax.faces.event.MethodExpressionActionListener;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import com.sun.facelets.el.LegacyMethodBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
+
import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.util.FacesAPI;
+import com.sun.facelets.tag.TagAttribute;

/**
*
@@ -38,81 +37,40 @@
*/
final class ActionSourceRule extends MetaRule
{
+ public final static Class<?>[] ACTION_SIG = new Class[0];

- public final static Class[] ACTION_SIG = new Class[0];
-
- public final static Class[] ACTION_LISTENER_SIG = new Class[] { ActionEvent.class };
-
- final static class ActionMapper extends Metadata
- {
-
- private final TagAttribute attr;
-
- public ActionMapper(TagAttribute attr)
- {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance)
- {
- ((ActionSource) instance).setAction(new LegacyMethodBinding(this.attr
- .getMethodExpression(ctx, String.class, ActionSourceRule.ACTION_SIG)));
- }
- }
+ public final static Class<?>[] ACTION_LISTENER_SIG = new Class<?>[] { ActionEvent.class };

final static class ActionMapper2 extends Metadata
{
-
- private final TagAttribute attr;
+ private final TagAttribute _attr;

public ActionMapper2(TagAttribute attr)
{
- this.attr = attr;
+ this._attr = attr;
}

public void applyMetadata(FaceletContext ctx, Object instance)
{
- ((ActionSource2) instance).setActionExpression(this.attr.getMethodExpression(ctx, String.class,
- ActionSourceRule.ACTION_SIG));
+ MethodExpression expr = _attr.getMethodExpression(ctx, String.class, ActionSourceRule.ACTION_SIG);
+ ((ActionSource2) instance).setActionExpression(expr);
}
-
- }
-
- final static class ActionListenerMapper extends Metadata
- {
-
- private final TagAttribute attr;
-
- public ActionListenerMapper(TagAttribute attr)
- {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance)
- {
- ((ActionSource) instance).setActionListener(new LegacyMethodBinding(this.attr
- .getMethodExpression(ctx, null, ActionSourceRule.ACTION_LISTENER_SIG)));
- }
-
}

final static class ActionListenerMapper2 extends Metadata
{
-
- private final TagAttribute attr;
+ private final TagAttribute _attr;

public ActionListenerMapper2(TagAttribute attr)
{
- this.attr = attr;
+ _attr = attr;
}

public void applyMetadata(FaceletContext ctx, Object instance)
{
- ((ActionSource2) instance).addActionListener(new MethodExpressionActionListener(this.attr
- .getMethodExpression(ctx, null, ActionSourceRule.ACTION_LISTENER_SIG)));
-
+ MethodExpression expr = _attr.getMethodExpression(ctx, null, ActionSourceRule.ACTION_LISTENER_SIG);
+ ((ActionSource2) instance).addActionListener(new MethodExpressionActionListener(expr));
}
-
}

public final static ActionSourceRule Instance = new ActionSourceRule();
@@ -126,33 +84,17 @@
{
if (meta.isTargetInstanceOf(ActionSource.class))
{
-
- boolean elSupport = FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12;
-
if ("action".equals(name))
{
- if (elSupport && meta.isTargetInstanceOf(ActionSource2.class))
- {
- return new ActionMapper2(attribute);
- }
- else
- {
- return new ActionMapper(attribute);
- }
+ return new ActionMapper2(attribute);
}

if ("actionListener".equals(name))
{
- if (elSupport && meta.isTargetInstanceOf(ActionSource2.class))
- {
- return new ActionListenerMapper2(attribute);
- }
- else
- {
- return new ActionListenerMapper(attribute);
- }
+ return new ActionListenerMapper2(attribute);
}
}
+
return null;
}
}

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentHandler.java Thu Feb 12 01:23:54 2009
@@ -23,37 +23,23 @@
import java.util.logging.Logger;

import javax.el.ELException;
-import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.Application;
import javax.faces.component.ActionSource;
-import javax.faces.component.ActionSource2;
import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.component.ValueHolder;
import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.el.ValueBinding;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.MethodExpressionActionListener;
-import javax.faces.event.MethodExpressionValueChangeListener;
-import javax.faces.event.ValueChangeEvent;
-import javax.faces.validator.MethodExpressionValidator;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import com.sun.facelets.el.ELAdaptor;
-import com.sun.facelets.el.LegacyMethodBinding;
-import com.sun.facelets.el.LegacyValueBinding;
+
+import com.sun.beans.ObjectHandler;
+import com.sun.facelets.tag.MetaRuleset;
import com.sun.facelets.tag.MetaTagHandler;
import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
import com.sun.facelets.tag.TagException;
-import com.sun.facelets.tag.TagHandler;
-import com.sun.facelets.tag.MetaRuleset;
import com.sun.facelets.tag.jsf.core.FacetHandler;
-import com.sun.facelets.util.FacesAPI;

/**
* Implementation of the tag logic used in the JSF specification. This is your golden hammer for wiring UIComponents to
@@ -230,32 +216,11 @@
if (this.binding != null)
{
ValueExpression ve = this.binding.getValueExpression(ctx, Object.class);
- if (FacesAPI.getVersion() >= 12)
- {
- c = app.createComponent(ve, faces, this.componentType);
- if (c != null)
- {
- // Make sure the component supports 1.2
- if (FacesAPI.getComponentVersion(c) >= 12)
- {
- c.setValueExpression("binding", ve);
- }
- else
- {
- ValueBinding vb = new LegacyValueBinding(ve);
- c.setValueBinding("binding", vb);
- }
-
- }
- }
- else
+
+ c = app.createComponent(ve, faces, this.componentType);
+ if (c != null)
{
- ValueBinding vb = new LegacyValueBinding(ve);
- c = app.createComponent(vb, faces, this.componentType);
- if (c != null)
- {
- c.setValueBinding("binding", vb);
- }
+ c.setValueExpression("binding", ve);
}
}
else
@@ -282,7 +247,8 @@
return ctx.generateUniqueId(this.tagId);
}

- protected MetaRuleset createMetaRuleset(Class type)
+ @Override
+ protected MetaRuleset createMetaRuleset(Class<?> type)
{
MetaRuleset m = super.createMetaRuleset(type);


Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentRule.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentRule.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentRule.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentRule.java Thu Feb 12 01:23:54 2009
@@ -22,15 +22,12 @@
import java.util.logging.Logger;

import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import com.sun.facelets.el.LegacyValueBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
+
import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.util.FacesAPI;
+import com.sun.facelets.tag.TagAttribute;

/**
*
@@ -42,67 +39,40 @@

final class LiteralAttributeMetadata extends Metadata
{
-
- private final String name;
- private final String value;
+ private final String _name;
+ private final String _value;

public LiteralAttributeMetadata(String name, String value)
{
- this.value = value;
- this.name = name;
+ _name = name;
+ _value = value;
}

public void applyMetadata(FaceletContext ctx, Object instance)
{
- ((UIComponent) instance).getAttributes().put(this.name, this.value);
+ ((UIComponent) instance).getAttributes().put(_name, _value);
}
}

final static class ValueExpressionMetadata extends Metadata
{
+ private final String _name;

- private final String name;
-
- private final TagAttribute attr;
-
- private final Class type;
-
- public ValueExpressionMetadata(String name, Class type, TagAttribute attr)
- {
- this.name = name;
- this.attr = attr;
- this.type = type;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance)
- {
- ((UIComponent) instance).setValueExpression(this.name, this.attr.getValueExpression(ctx, this.type));
- }
-
- }
-
- final static class ValueBindingMetadata extends Metadata
- {
-
- private final String name;
+ private final TagAttribute _attr;

- private final TagAttribute attr;
+ private final Class<?> _type;

- private final Class type;
-
- public ValueBindingMetadata(String name, Class type, TagAttribute attr)
+ public ValueExpressionMetadata(String name, Class<?> type, TagAttribute attr)
{
- this.name = name;
- this.attr = attr;
- this.type = type;
+ _name = name;
+ _attr = attr;
+ _type = type;
}

public void applyMetadata(FaceletContext ctx, Object instance)
{
- ((UIComponent) instance).setValueBinding(this.name, new LegacyValueBinding(this.attr
- .getValueExpression(ctx, this.type)));
+ ((UIComponent) instance).setValueExpression(_name, _attr.getValueExpression(ctx, _type));
}
-
}

private final static Logger log = Logger.getLogger("facelets.tag.component");
@@ -118,23 +88,16 @@
{
if (meta.isTargetInstanceOf(UIComponent.class))
{
-
// if component and dynamic, then must set expression
if (!attribute.isLiteral())
{
- Class type = meta.getPropertyType(name);
+ Class<?> type = meta.getPropertyType(name);
if (type == null)
{
type = Object.class;
}
- if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12)
- {
- return new ValueExpressionMetadata(name, type, attribute);
- }
- else
- {
- return new ValueBindingMetadata(name, type, attribute);
- }
+
+ return new ValueExpressionMetadata(name, type, attribute);
}
else if (meta.getWriteMethod(name) == null)
{
@@ -148,7 +111,7 @@
return null;
}

- private static void warnAttr(TagAttribute attr, Class type, String n)
+ private static void warnAttr(TagAttribute attr, Class<?> type, String n)
{
if (log.isLoggable(Level.FINER))
{

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentSupport.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentSupport.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentSupport.java Thu Feb 12 01:23:54 2009
@@ -19,9 +19,7 @@
package com.sun.facelets.tag.jsf;

import java.io.IOException;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -30,9 +28,8 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import javax.faces.webapp.pdl.facelets.FaceletHandler;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;


Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ConvertHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ConvertHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ConvertHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ConvertHandler.java Thu Feb 12 01:23:54 2009
@@ -27,14 +27,14 @@
import javax.faces.component.ValueHolder;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
+import com.sun.facelets.tag.MetaRuleset;
import com.sun.facelets.tag.MetaTagHandler;
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagException;
-import com.sun.facelets.tag.MetaRuleset;

/**
* Handles setting a Converter instance on a ValueHolder. Will wire all attributes set to the Converter instance

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/EditableValueHolderRule.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/EditableValueHolderRule.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/EditableValueHolderRule.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/EditableValueHolderRule.java Thu Feb 12 01:23:54 2009
@@ -24,14 +24,12 @@
import javax.faces.event.MethodExpressionValueChangeListener;
import javax.faces.event.ValueChangeEvent;
import javax.faces.validator.MethodExpressionValidator;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import com.sun.facelets.el.LegacyMethodBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
+
import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.util.FacesAPI;
+import com.sun.facelets.tag.TagAttribute;

/**
*
@@ -74,22 +72,6 @@
}
}

- final static class ValueChangedBindingMetadata extends Metadata
- {
- private final TagAttribute attr;
-
- public ValueChangedBindingMetadata(TagAttribute attr)
- {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance)
- {
- ((EditableValueHolder) instance).setValueChangeListener(new LegacyMethodBinding(this.attr
- .getMethodExpression(ctx, null, VALUECHANGE_SIG)));
- }
- }
-
final static class ValidatorExpressionMetadata extends Metadata
{
private final TagAttribute attr;
@@ -106,25 +88,9 @@
}
}

- final static class ValidatorBindingMetadata extends Metadata
- {
- private final TagAttribute attr;
-
- public ValidatorBindingMetadata(TagAttribute attr)
- {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance)
- {
- ((EditableValueHolder) instance).setValidator(new LegacyMethodBinding(this.attr
- .getMethodExpression(ctx, null, VALIDATOR_SIG)));
- }
- }
-
- private final static Class[] VALIDATOR_SIG = new Class[] { FacesContext.class, UIComponent.class, Object.class };
+ private final static Class<?>[] VALIDATOR_SIG = new Class[] { FacesContext.class, UIComponent.class, Object.class };

- private final static Class[] VALUECHANGE_SIG = new Class[] { ValueChangeEvent.class };
+ private final static Class<?>[] VALUECHANGE_SIG = new Class[] { ValueChangeEvent.class };

public final static EditableValueHolderRule Instance = new EditableValueHolderRule();

@@ -134,34 +100,21 @@
if (meta.isTargetInstanceOf(EditableValueHolder.class))
{

- boolean elSupport = FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12;
-
if ("validator".equals(name))
{
if (attribute.isLiteral())
{
return new LiteralValidatorMetadata(attribute.getValue());
}
- else if (elSupport)
- {
- return new ValidatorExpressionMetadata(attribute);
- }
else
{
- return new ValidatorBindingMetadata(attribute);
+ return new ValidatorExpressionMetadata(attribute);
}
}

if ("valueChangeListener".equals(name))
{
- if (elSupport)
- {
- return new ValueChangedExpressionMetadata(attribute);
- }
- else
- {
- return new ValueChangedBindingMetadata(attribute);
- }
+ return new ValueChangedExpressionMetadata(attribute);
}

}

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValidateHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValidateHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValidateHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValidateHandler.java Thu Feb 12 01:23:54 2009
@@ -26,14 +26,14 @@
import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIComponent;
import javax.faces.validator.Validator;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
+import com.sun.facelets.tag.MetaRuleset;
import com.sun.facelets.tag.MetaTagHandler;
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagException;
-import com.sun.facelets.tag.MetaRuleset;

/**
* Handles setting a Validator instance on a EditableValueHolder. Will wire all attributes set to the Validator instance

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValueHolderRule.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValueHolderRule.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValueHolderRule.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValueHolderRule.java Thu Feb 12 01:23:54 2009
@@ -21,14 +21,12 @@
import javax.faces.component.UIComponent;
import javax.faces.component.ValueHolder;
import javax.faces.convert.Converter;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import com.sun.facelets.el.LegacyValueBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
+
import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.util.FacesAPI;
+import com.sun.facelets.tag.TagAttribute;

/**
*
@@ -55,23 +53,6 @@
}
}

- final static class DynamicConverterMetadata extends Metadata
- {
-
- private final TagAttribute attr;
-
- public DynamicConverterMetadata(TagAttribute attr)
- {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance)
- {
- ((UIComponent) instance).setValueBinding("converter", new LegacyValueBinding(attr
- .getValueExpression(ctx, Converter.class)));
- }
- }
-
final static class DynamicConverterMetadata2 extends Metadata
{

@@ -120,23 +101,6 @@
}
}

- final static class DynamicValueBindingMetadata extends Metadata
- {
-
- private final TagAttribute attr;
-
- public DynamicValueBindingMetadata(TagAttribute attr)
- {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance)
- {
- ((UIComponent) instance).setValueBinding("value", new LegacyValueBinding(attr
- .getValueExpression(ctx, Object.class)));
- }
- }
-
public final static ValueHolderRule Instance = new ValueHolderRule();

public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta)
@@ -152,14 +116,7 @@
}
else
{
- if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12)
- {
- return new DynamicConverterMetadata2(attribute);
- }
- else
- {
- return new DynamicConverterMetadata(attribute);
- }
+ return new DynamicConverterMetadata2(attribute);
}
}

@@ -171,14 +128,7 @@
}
else
{
- if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12)
- {
- return new DynamicValueExpressionMetadata(attribute);
- }
- else
- {
- return new DynamicValueBindingMetadata(attribute);
- }
+ return new DynamicValueExpressionMetadata(attribute);
}
}
}

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ActionListenerHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ActionListenerHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ActionListenerHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ActionListenerHandler.java Thu Feb 12 01:23:54 2009
@@ -30,9 +30,9 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;
import com.sun.facelets.tag.TagConfig;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/AttributeHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/AttributeHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/AttributeHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/AttributeHandler.java Thu Feb 12 01:23:54 2009
@@ -23,10 +23,9 @@
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
-import com.sun.facelets.el.ELAdaptor;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagException;
@@ -44,10 +43,9 @@
*/
public final class AttributeHandler extends TagHandler
{
+ private final TagAttribute _name;

- private final TagAttribute name;
-
- private final TagAttribute value;
+ private final TagAttribute _value;

/**
* @param config
@@ -55,8 +53,8 @@
public AttributeHandler(TagConfig config)
{
super(config);
- this.name = this.getRequiredAttribute("name");
- this.value = this.getRequiredAttribute("value");
+ _name = getRequiredAttribute("name");
+ _value = getRequiredAttribute("value");
}

/*
@@ -75,16 +73,16 @@
// only process if the parent is new to the tree
if (parent.getParent() == null)
{
- String n = this.name.getValue(ctx);
+ String n = _name.getValue(ctx);
if (!parent.getAttributes().containsKey(n))
{
- if (this.value.isLiteral())
+ if (_value.isLiteral())
{
- parent.getAttributes().put(n, this.value.getValue());
+ parent.getAttributes().put(n, _value.getValue());
}
else
{
- ELAdaptor.setExpression(parent, n, this.value.getValueExpression(ctx, Object.class));
+ parent.setValueExpression(n, _value.getValueExpression(ctx, Object.class));
}
}
}

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDateTimeHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDateTimeHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDateTimeHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDateTimeHandler.java Thu Feb 12 01:23:54 2009
@@ -24,9 +24,9 @@
import javax.faces.FacesException;
import javax.faces.convert.Converter;
import javax.faces.convert.DateTimeConverter;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.MetaRuleset;
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDelegateHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDelegateHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDelegateHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDelegateHandler.java Thu Feb 12 01:23:54 2009
@@ -21,11 +21,11 @@
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.convert.Converter;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
+
import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.jsf.ConvertHandler;
import com.sun.facelets.tag.jsf.ConverterConfig;


Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertNumberHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertNumberHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertNumberHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertNumberHandler.java Thu Feb 12 01:23:54 2009
@@ -22,11 +22,11 @@
import javax.faces.FacesException;
import javax.faces.convert.Converter;
import javax.faces.convert.NumberConverter;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
+
import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.jsf.ComponentSupport;
import com.sun.facelets.tag.jsf.ConvertHandler;
import com.sun.facelets.tag.jsf.ConverterConfig;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/CoreLibrary.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/CoreLibrary.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/CoreLibrary.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/CoreLibrary.java Thu Feb 12 01:23:54 2009
@@ -18,7 +18,6 @@
*/
package com.sun.facelets.tag.jsf.core;

-import javax.faces.component.UIOutput;
import javax.faces.component.UIParameter;
import javax.faces.component.UISelectItem;
import javax.faces.component.UISelectItems;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/FacetHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/FacetHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/FacetHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/FacetHandler.java Thu Feb 12 01:23:54 2009
@@ -23,10 +23,9 @@
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagException;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/LoadBundleHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/LoadBundleHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/LoadBundleHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/LoadBundleHandler.java Thu Feb 12 01:23:54 2009
@@ -33,9 +33,9 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;
import com.sun.facelets.tag.TagConfig;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/PhaseListenerHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/PhaseListenerHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/PhaseListenerHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/PhaseListenerHandler.java Thu Feb 12 01:23:54 2009
@@ -31,9 +31,9 @@
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;
import com.sun.facelets.tag.TagConfig;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java Thu Feb 12 01:23:54 2009
@@ -26,36 +26,30 @@
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.ActionSource;
-import javax.faces.component.ActionSource2;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
-import com.sun.facelets.el.LegacyValueBinding;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagException;
import com.sun.facelets.tag.TagHandler;
import com.sun.facelets.tag.jsf.ComponentSupport;
-import com.sun.facelets.util.FacesAPI;

public class SetPropertyActionListenerHandler extends TagHandler
{
-
- private final TagAttribute value;
-
- private final TagAttribute target;
+ private final TagAttribute _target;
+ private final TagAttribute _value;

public SetPropertyActionListenerHandler(TagConfig config)
{
super(config);
- this.value = this.getRequiredAttribute("value");
- this.target = this.getRequiredAttribute("target");
+ this._value = this.getRequiredAttribute("value");
+ this._target = this.getRequiredAttribute("target");
}

public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException,
@@ -66,22 +60,10 @@
ActionSource src = (ActionSource) parent;
if (ComponentSupport.isNew(parent))
{
- ValueExpression valueExpr = this.value.getValueExpression(ctx, Object.class);
- ValueExpression targetExpr = this.target.getValueExpression(ctx, Object.class);
+ ValueExpression valueExpr = _value.getValueExpression(ctx, Object.class);
+ ValueExpression targetExpr = _target.getValueExpression(ctx, Object.class);

- ActionListener listener;
-
- if (FacesAPI.getVersion() >= 12 && src instanceof ActionSource2)
- {
- listener = new SetPropertyListener(valueExpr, targetExpr);
- }
- else
- {
- listener = new LegacySetPropertyListener(new LegacyValueBinding(valueExpr),
- new LegacyValueBinding(targetExpr));
- }
-
- src.addActionListener(listener);
+ src.addActionListener(new SetPropertyListener(valueExpr, targetExpr));
}
}
else
@@ -90,38 +72,10 @@
}
}

- private static class LegacySetPropertyListener implements ActionListener, Serializable
- {
-
- private ValueBinding value;
-
- private ValueBinding target;
-
- public LegacySetPropertyListener()
- {
- };
-
- public LegacySetPropertyListener(ValueBinding value, ValueBinding target)
- {
- this.value = value;
- this.target = target;
- }
-
- public void processAction(ActionEvent evt) throws AbortProcessingException
- {
- FacesContext faces = FacesContext.getCurrentInstance();
- Object valueObj = this.value.getValue(faces);
- this.target.setValue(faces, valueObj);
- }
-
- }
-
private static class SetPropertyListener implements ActionListener, Serializable
{
-
- private ValueExpression value;
-
- private ValueExpression target;
+ private ValueExpression _target;
+ private ValueExpression _value;

public SetPropertyListener()
{
@@ -129,18 +83,19 @@

public SetPropertyListener(ValueExpression value, ValueExpression target)
{
- this.value = value;
- this.target = target;
+ _value = value;
+ _target = target;
}

public void processAction(ActionEvent evt) throws AbortProcessingException
{
FacesContext faces = FacesContext.getCurrentInstance();
+
ELContext el = faces.getELContext();
- Object valueObj = this.value.getValue(el);
- this.target.setValue(el, valueObj);
+
+ Object valueObj = _value.getValue(el);
+
+ _target.setValue(el, valueObj);
}
-
}
-
}

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValidateDelegateHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValidateDelegateHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValidateDelegateHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValidateDelegateHandler.java Thu Feb 12 01:23:54 2009
@@ -19,10 +19,10 @@
package com.sun.facelets.tag.jsf.core;

import javax.faces.validator.Validator;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import com.sun.facelets.tag.TagAttribute;
+
import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.jsf.ValidateHandler;
import com.sun.facelets.tag.jsf.ValidatorConfig;


Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValueChangeListenerHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValueChangeListenerHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValueChangeListenerHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValueChangeListenerHandler.java Thu Feb 12 01:23:54 2009
@@ -30,9 +30,9 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ValueChangeEvent;
import javax.faces.event.ValueChangeListener;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;
import com.sun.facelets.tag.TagConfig;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/VerbatimHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/VerbatimHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/VerbatimHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/VerbatimHandler.java Thu Feb 12 01:23:54 2009
@@ -18,13 +18,11 @@
*/
package com.sun.facelets.tag.jsf.core;

-import java.io.IOException;
import java.util.Iterator;

-import javax.el.ELException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
+
import com.sun.facelets.tag.TextHandler;
import com.sun.facelets.tag.jsf.ComponentConfig;
import com.sun.facelets.tag.jsf.ComponentHandler;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ViewHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ViewHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ViewHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ViewHandler.java Thu Feb 12 01:23:54 2009
@@ -19,7 +19,6 @@
package com.sun.facelets.tag.jsf.core;

import java.io.IOException;
-import java.util.logging.Logger;

import javax.el.ELException;
import javax.el.MethodExpression;
@@ -27,9 +26,9 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.event.PhaseEvent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/CatchHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/CatchHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/CatchHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/CatchHandler.java Thu Feb 12 01:23:54 2009
@@ -23,9 +23,9 @@
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseHandler.java Thu Feb 12 01:23:54 2009
@@ -18,9 +18,6 @@
*/
package com.sun.facelets.tag.jstl.core;

-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagException;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
@@ -28,11 +25,12 @@

import javax.el.ELException;
import javax.faces.FacesException;
-
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
import com.sun.facelets.tag.TagHandler;

/**
@@ -49,22 +47,23 @@
{
super(config);

- List whenList = new ArrayList();
- Iterator itr = this.findNextByType(ChooseWhenHandler.class);
- while (itr.hasNext())
+ List<ChooseWhenHandler> whenList = new ArrayList<ChooseWhenHandler>();
+ Iterator<ChooseWhenHandler> itrWhen = this.findNextByType(ChooseWhenHandler.class);
+ while (itrWhen.hasNext())
{
- whenList.add(itr.next());
+ whenList.add(itrWhen.next());
}
if (whenList.isEmpty())
{
throw new TagException(this.tag, "Choose Tag must have one or more When Tags");
}
+
this.when = (ChooseWhenHandler[]) whenList.toArray(new ChooseWhenHandler[whenList.size()]);

- itr = this.findNextByType(ChooseOtherwiseHandler.class);
- if (itr.hasNext())
+ Iterator<ChooseOtherwiseHandler> itrOtherwise = this.findNextByType(ChooseOtherwiseHandler.class);
+ if (itrOtherwise.hasNext())
{
- this.otherwise = (ChooseOtherwiseHandler) itr.next();
+ this.otherwise = itrOtherwise.next();
}
else
{

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseOtherwiseHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseOtherwiseHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseOtherwiseHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseOtherwiseHandler.java Thu Feb 12 01:23:54 2009
@@ -18,17 +18,15 @@
*/
package com.sun.facelets.tag.jstl.core;

-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import com.sun.facelets.tag.TagConfig;
import java.io.IOException;

import javax.el.ELException;
import javax.faces.FacesException;
-
+import javax.faces.component.UIComponent;
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
+import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

/**

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseWhenHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseWhenHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseWhenHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseWhenHandler.java Thu Feb 12 01:23:54 2009
@@ -18,17 +18,16 @@
*/
package com.sun.facelets.tag.jstl.core;

-import javax.faces.component.UIComponent;
-
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagConfig;
import java.io.IOException;

import javax.el.ELException;
import javax.faces.FacesException;
-
+import javax.faces.component.UIComponent;
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

/**

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ForEachHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ForEachHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ForEachHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ForEachHandler.java Thu Feb 12 01:23:54 2009
@@ -18,25 +18,25 @@
*/
package com.sun.facelets.tag.jstl.core;

-import javax.faces.webapp.pdl.facelets.FaceletContext;
-import javax.faces.webapp.pdl.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagAttributeException;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagHandler;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;

import javax.el.ELException;
import javax.el.ValueExpression;
import javax.el.VariableMapper;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
+import javax.faces.webapp.pdl.facelets.FaceletContext;
+import javax.faces.webapp.pdl.facelets.FaceletException;

-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagHandler;

/**
* @author Jacob Hookom

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/IfHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/IfHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/IfHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/IfHandler.java Thu Feb 12 01:23:54 2009
@@ -23,8 +23,8 @@
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/SetHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/SetHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/SetHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/SetHandler.java Thu Feb 12 01:23:54 2009
@@ -24,9 +24,9 @@
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java Thu Feb 12 01:23:54 2009
@@ -31,10 +31,9 @@
import javax.el.VariableMapper;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
-import javax.faces.webapp.pdl.facelets.FaceletHandler;
+
import com.sun.facelets.TemplateClient;
import com.sun.facelets.el.VariableMapperWrapper;
import com.sun.facelets.tag.TagAttribute;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DecorateHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DecorateHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DecorateHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DecorateHandler.java Thu Feb 12 01:23:54 2009
@@ -31,10 +31,9 @@
import javax.el.VariableMapper;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
-import javax.faces.webapp.pdl.facelets.FaceletHandler;
+
import com.sun.facelets.TemplateClient;
import com.sun.facelets.el.VariableMapperWrapper;
import com.sun.facelets.tag.TagAttribute;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DefineHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DefineHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DefineHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DefineHandler.java Thu Feb 12 01:23:54 2009
@@ -23,9 +23,9 @@
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;
import com.sun.facelets.tag.TagConfig;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/IncludeHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/IncludeHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/IncludeHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/IncludeHandler.java Thu Feb 12 01:23:54 2009
@@ -24,9 +24,9 @@
import javax.el.VariableMapper;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.el.VariableMapperWrapper;
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java Thu Feb 12 01:23:54 2009
@@ -23,10 +23,9 @@
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
-import javax.faces.webapp.pdl.facelets.FaceletHandler;
+
import com.sun.facelets.TemplateClient;
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagAttributeException;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/ParamHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/ParamHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/ParamHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/ParamHandler.java Thu Feb 12 01:23:54 2009
@@ -24,9 +24,9 @@
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
import javax.faces.webapp.pdl.facelets.FaceletException;
+
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.TagHandler;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/RepeatHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/RepeatHandler.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/RepeatHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/RepeatHandler.java Thu Feb 12 01:23:54 2009
@@ -25,12 +25,10 @@
import java.util.Set;

import javax.faces.component.UIComponent;
-
import javax.faces.webapp.pdl.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRule;
+
import com.sun.facelets.tag.MetaRuleset;
import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.jsf.ComponentConfig;
import com.sun.facelets.tag.jsf.ComponentHandler;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java Thu Feb 12 01:23:54 2009
@@ -26,7 +26,6 @@
import java.net.URLConnection;
import java.net.URLDecoder;
import java.util.Enumeration;
-import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.jar.JarEntry;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/DevTools.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/DevTools.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/DevTools.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/DevTools.java Thu Feb 12 01:23:54 2009
@@ -37,11 +37,9 @@
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
-import java.util.logging.Logger;

import javax.el.Expression;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIViewRoot;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/ReflectionUtil.java?rev=743585&r1=743584&r2=743585&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/ReflectionUtil.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/ReflectionUtil.java Thu Feb 12 01:23:54 2009
@@ -41,7 +41,7 @@
super();
}

- public static Class forName(String name) throws ClassNotFoundException
+ public static Class<?> forName(String name) throws ClassNotFoundException
{
if (null == name || "".equals(name))
{

Search Discussions

  • Slessard at Feb 12, 2009 at 1:24 am
    Author: slessard
    Date: Thu Feb 12 01:23:54 2009
    New Revision: 743585

    URL: http://svn.apache.org/viewvc?rev=743585&view=rev
    Log:
    Removed code forks based on current JSF version check in Facelets (checking if > 1.2 makes no sense once integrated to MyFaces 2.0);
    Applied some format rules to Facelets;
    Added generic to most Facelets classes (those left will be taken care of soon).

    Removed:
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/ELAdaptor.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/LegacyELContext.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/LegacyMethodBinding.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/LegacyValueBinding.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/FacesAPI.java
    Modified:
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletViewHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/StateWriter.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AbstractUIHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AttributeInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CommentInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationManager.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationUnit.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Compiler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EncodingHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EndElementInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Instruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralAttributeInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralCommentInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralTextInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceManager.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceUnit.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/SAXCompiler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/StartElementInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagLibraryConfig.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagUnit.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextUnit.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructionHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructions.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILeaf.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILiteralTextHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIText.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UITextHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/XMLInstruction.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/RepeatRenderer.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/UIRepeat.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultVariableMapper.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/ELText.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/TagValueExpression.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFacelet.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletFactory.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/AbstractTagLibrary.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/CompositeFaceletHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaRulesetImpl.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaTagHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MethodRule.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagAttribute.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/UserTagHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ActionSourceRule.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentRule.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ComponentSupport.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ConvertHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/EditableValueHolderRule.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValidateHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/ValueHolderRule.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ActionListenerHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/AttributeHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDateTimeHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertDelegateHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ConvertNumberHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/CoreLibrary.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/FacetHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/LoadBundleHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/PhaseListenerHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValidateDelegateHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ValueChangeListenerHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/VerbatimHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jsf/core/ViewHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/CatchHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseOtherwiseHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ChooseWhenHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/ForEachHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/IfHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/jstl/core/SetHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DecorateHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/DefineHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/IncludeHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/ParamHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/RepeatHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/DevTools.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/ReflectionUtil.java

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java Thu Feb 12 01:23:54 2009
    @@ -33,7 +33,7 @@
    public abstract class FaceletFactory
    {

    - private static ThreadLocal Instance = new ThreadLocal();
    + private static ThreadLocal<FaceletFactory> instance = new ThreadLocal<FaceletFactory>();

    /**
    * Return a Facelet instance as specified by the file at the passed URI.
    @@ -54,7 +54,7 @@
    */
    public static final void setInstance(FaceletFactory factory)
    {
    - Instance.set(factory);
    + instance.set(factory);
    }

    /**
    @@ -64,6 +64,6 @@
    */
    public static final FaceletFactory getInstance()
    {
    - return (FaceletFactory) Instance.get();
    + return instance.get();
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletViewHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletViewHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletViewHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletViewHandler.java Thu Feb 12 01:23:54 2009
    @@ -51,10 +51,8 @@
    import com.sun.facelets.impl.ResourceResolver;
    import com.sun.facelets.tag.TagDecorator;
    import com.sun.facelets.tag.TagLibrary;
    -import com.sun.facelets.tag.jsf.ComponentSupport;
    import com.sun.facelets.tag.ui.UIDebug;
    import com.sun.facelets.util.DevTools;
    -import com.sun.facelets.util.FacesAPI;
    import com.sun.facelets.util.ReflectionUtil;

    /**
    @@ -124,8 +122,6 @@

    private final static int STATE_KEY_LEN = STATE_KEY.length();

    - private final static Object STATE_NULL = new Object();
    -
    private final ViewHandler parent;

    private boolean developmentMode = false;
    @@ -203,8 +199,8 @@
    {
    String[] mappingsArray = viewMappings.split(";");

    - List extensionsList = new ArrayList(mappingsArray.length);
    - List prefixesList = new ArrayList(mappingsArray.length);
    + List<String> extensionsList = new ArrayList<String>(mappingsArray.length);
    + List<String> prefixesList = new ArrayList<String>(mappingsArray.length);

    for (int i = 0; i < mappingsArray.length; i++)
    {
    @@ -353,13 +349,6 @@
    // But in JSF 1.1, it will be called for an initial request too,
    // in which case we must return null in order to fall through
    // to createView()
    - if (FacesAPI.getVersion() < 12)
    - {
    - if (!isPostback11(context))
    - {
    - return null;
    - }
    - }

    ViewHandler outerViewHandler = context.getApplication().getViewHandler();
    String renderKitId = outerViewHandler.calculateRenderKitId(context);
    @@ -464,8 +453,8 @@
    String encoding = orig;

    // see if we need to override the encoding
    - Map m = context.getExternalContext().getRequestMap();
    - Map sm = context.getExternalContext().getSessionMap();
    + Map<String, Object> m = context.getExternalContext().getRequestMap();
    + Map<String, Object> sm = context.getExternalContext().getSessionMap();

    // 1. check the request attribute
    if (m.containsKey("facelets.Encoding"))
    @@ -520,7 +509,7 @@
    String contentType = orig;

    // see if we need to override the contentType
    - Map m = context.getExternalContext().getRequestMap();
    + Map<String, Object> m = context.getExternalContext().getRequestMap();
    if (m.containsKey("facelets.ContentType"))
    {
    contentType = (String) m.get("facelets.ContentType");
    @@ -640,25 +629,12 @@

    // render the view to the response
    writer.startDocument();
    - if (FacesAPI.getVersion() >= 12)
    - {
    - viewToRender.encodeAll(context);
    - }
    - else
    - {
    - ComponentSupport.encodeRecursive(context, viewToRender);
    - }
    + viewToRender.encodeAll(context);
    writer.endDocument();

    // finish writing
    writer.close();

    - // remove transients for older versions
    - if (FacesAPI.getVersion() < 12)
    - {
    - ComponentSupport.removeTransient(viewToRender);
    - }
    -
    boolean writtenState = stateWriter.isStateWritten();
    // flush to origWriter
    if (writtenState)
    @@ -701,14 +677,6 @@
    else
    {
    origWriter.write(content);
    - // But for JSF 1.1 (actually, just 1.1_01 RI), if we didn't
    - // detect any saved state, force a call to
    - // saveSerializedView() in case we're using the old
    - // pure-server-side state saving
    - if ((FacesAPI.getVersion() < 12) && !stateMgr.isSavingStateInClient(context))
    - {
    - stateMgr.saveSerializedView(context);
    - }
    }
    }

    @@ -932,7 +900,7 @@
    }
    else
    {
    - Map paramMap = context.getExternalContext().getRequestParameterMap();
    + Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();
    return !paramMap.isEmpty();
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/StateWriter.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/StateWriter.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/StateWriter.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/StateWriter.java Thu Feb 12 01:23:54 2009
    @@ -138,8 +138,8 @@

    public void release()
    {
    - CURRENT_WRITER.set(null);
    + CURRENT_WRITER.remove();
    }

    - static private final ThreadLocal CURRENT_WRITER = new ThreadLocal();
    + static private final ThreadLocal<StateWriter> CURRENT_WRITER = new ThreadLocal<StateWriter>();
    }
    \ No newline at end of file

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AbstractUIHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AbstractUIHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AbstractUIHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AbstractUIHandler.java Thu Feb 12 01:23:54 2009
    @@ -19,9 +19,9 @@
    package com.sun.facelets.compiler;

    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.tag.TextHandler;
    import com.sun.facelets.tag.jsf.core.FacetHandler;


    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AttributeInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AttributeInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AttributeInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/AttributeInstruction.java Thu Feb 12 01:23:54 2009
    @@ -19,31 +19,28 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.util.List;

    import javax.el.ELContext;
    import javax.el.ELException;
    import javax.el.ExpressionFactory;
    -
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;

    -import com.sun.facelets.el.ELAdaptor;
    import com.sun.facelets.el.ELText;

    final class AttributeInstruction implements Instruction
    {
    - private final String alias;
    + private final String _alias;

    - private final String attr;
    + private final String _attr;

    - private final ELText txt;
    + private final ELText _txt;

    public AttributeInstruction(String alias, String attr, ELText txt)
    {
    - this.alias = alias;
    - this.attr = attr;
    - this.txt = txt;
    + _alias = alias;
    + _attr = attr;
    + _txt = txt;
    }

    public void write(FacesContext context) throws IOException
    @@ -51,34 +48,31 @@
    ResponseWriter out = context.getResponseWriter();
    try
    {
    - ELContext elContext = ELAdaptor.getELContext(context);
    - String val = txt.toString(elContext);
    -
    - out.writeAttribute(attr, val, null);
    + out.writeAttribute(_attr, _txt.toString(context.getELContext()), null);
    }
    catch (ELException e)
    {
    - throw new ELException(this.alias + ": " + e.getMessage(), e.getCause());
    + throw new ELException(_alias + ": " + e.getMessage(), e.getCause());
    }
    catch (Exception e)
    {
    - throw new ELException(this.alias + ": " + e.getMessage(), e);
    + throw new ELException(_alias + ": " + e.getMessage(), e);
    }
    }

    public Instruction apply(ExpressionFactory factory, ELContext ctx)
    {
    - ELText nt = this.txt.apply(factory, ctx);
    - if (nt == this.txt)
    + ELText nt = _txt.apply(factory, ctx);
    + if (nt == _txt)
    {
    return this;
    }

    - return new AttributeInstruction(alias, attr, nt);
    + return new AttributeInstruction(_alias, _attr, nt);
    }

    public boolean isLiteral()
    {
    - return txt.isLiteral();
    + return _txt.isLiteral();
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CommentInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CommentInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CommentInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CommentInstruction.java Thu Feb 12 01:23:54 2009
    @@ -19,36 +19,30 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.util.List;

    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    -
    import javax.faces.context.FacesContext;
    -import javax.faces.context.ResponseWriter;

    -import com.sun.facelets.el.ELAdaptor;
    import com.sun.facelets.el.ELText;

    final class CommentInstruction implements Instruction
    {
    - private final ELText text;
    + private final ELText _text;

    public CommentInstruction(ELText text)
    {
    - this.text = text;
    + _text = text;
    }

    public void write(FacesContext context) throws IOException
    {
    - ELContext elContext = ELAdaptor.getELContext(context);
    - context.getResponseWriter().writeComment(this.text.toString(elContext));
    + context.getResponseWriter().writeComment(_text.toString(context.getELContext()));
    }

    public Instruction apply(ExpressionFactory factory, ELContext ctx)
    {
    - ELText t = this.text.apply(factory, ctx);
    - return new CommentInstruction(t);
    + return new CommentInstruction(_text.apply(factory, ctx));
    }

    public boolean isLiteral()

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationManager.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationManager.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationManager.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationManager.java Thu Feb 12 01:23:54 2009
    @@ -25,6 +25,7 @@
    import java.util.logging.Logger;

    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.tag.Tag;
    import com.sun.facelets.tag.TagAttribute;
    import com.sun.facelets.tag.TagAttributeException;
    @@ -57,7 +58,7 @@

    private final NamespaceManager namespaceManager;

    - private final Stack units;
    + private final Stack<CompilationUnit> units;

    private int tagId;

    @@ -86,7 +87,7 @@
    this.finished = false;

    // our compilationunit stack
    - this.units = new Stack();
    + this.units = new Stack<CompilationUnit>();
    this.units.push(new CompilationUnit());
    }

    @@ -203,8 +204,6 @@
    String[] qname = this.determineQName(t);
    t = this.trimAttributes(t);

    - boolean handled = false;
    -
    if (isTrimmed(qname[0], qname[1]))
    {
    log.fine("Composition Found, Popping Parent Tags");
    @@ -336,20 +335,6 @@
    }
    }

    - private CompilationUnit searchUnits(Class type)
    - {
    - CompilationUnit unit = null;
    - int i = this.units.size();
    - while (unit == null && --i >= 0)
    - {
    - if (type.isAssignableFrom(this.units.get(i).getClass()))
    - {
    - unit = (CompilationUnit) this.units.get(i);
    - }
    - }
    - return unit;
    - }
    -
    private void startUnit(CompilationUnit unit)
    {

    @@ -456,7 +441,7 @@
    }
    else
    {
    - List attrList = new ArrayList(attr.length);
    + List<TagAttribute> attrList = new ArrayList<TagAttribute>(attr.length);
    int p = 0;
    for (int i = 0; i < attr.length; i++)
    {
    @@ -467,7 +452,7 @@
    }
    attrList.add(attr[i]);
    }
    - attr = (TagAttribute[]) attrList.toArray(new TagAttribute[attrList.size()]);
    + attr = attrList.toArray(new TagAttribute[attrList.size()]);
    return new Tag(tag.getLocation(), tag.getNamespace(), tag.getLocalName(), tag.getQName(),
    new TagAttributes(attr));
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationUnit.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationUnit.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationUnit.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/CompilationUnit.java Thu Feb 12 01:23:54 2009
    @@ -25,10 +25,10 @@
    import javax.el.ELException;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.tag.CompositeFaceletHandler;

    /**
    @@ -52,7 +52,7 @@
    }
    };

    - private List children;
    + private List<CompilationUnit> children;

    public CompilationUnit()
    {
    @@ -62,7 +62,7 @@
    {
    if (this.children == null)
    {
    - this.children = new ArrayList();
    + this.children = new ArrayList<CompilationUnit>();
    }
    this.children.add(unit);
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Compiler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Compiler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Compiler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Compiler.java Thu Feb 12 01:23:54 2009
    @@ -31,16 +31,15 @@
    import javax.el.ExpressionFactory;
    import javax.faces.FacesException;
    import javax.faces.context.FacesContext;
    -
    import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.tag.CompositeTagDecorator;
    import com.sun.facelets.tag.CompositeTagLibrary;
    import com.sun.facelets.tag.TagDecorator;
    import com.sun.facelets.tag.TagLibrary;
    import com.sun.facelets.tag.ui.UILibrary;
    import com.sun.facelets.util.ParameterCheck;
    -import com.sun.facelets.util.FacesAPI;
    import com.sun.facelets.util.ReflectionUtil;

    /**
    @@ -66,11 +65,11 @@

    private boolean trimmingComments = false;

    - private final List libraries = new ArrayList();
    + private final List<TagLibrary> libraries = new ArrayList<TagLibrary>();

    - private final List decorators = new ArrayList();
    + private final List<TagDecorator> decorators = new ArrayList<TagDecorator>();

    - private final Map features = new HashMap();
    + private final Map<String, String> features = new HashMap<String, String>();

    private boolean initialized = false;

    @@ -125,8 +124,7 @@
    {
    if (this.decorators.size() > 0)
    {
    - return new CompositeTagDecorator((TagDecorator[]) this.decorators.toArray(new TagDecorator[this.decorators
    - .size()]));
    + return new CompositeTagDecorator(this.decorators.toArray(new TagDecorator[this.decorators.size()]));
    }
    return EMPTY_DECORATOR;
    }
    @@ -144,16 +142,15 @@
    {
    ExpressionFactory el = null;
    el = (ExpressionFactory) this.featureInstance(EXPRESSION_FACTORY);
    - if (el == null && FacesAPI.getVersion() >= 12)
    + if (el == null)
    {
    try
    {
    el = FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
    if (el == null)
    {
    - log
    - .warning("No default ExpressionFactory from Faces Implementation, attempting to load from Feature["
    - + EXPRESSION_FACTORY + "]");
    + log.warning("No default ExpressionFactory from Faces Implementation, attempting to load from Feature["
    + + EXPRESSION_FACTORY + "]");
    }
    }
    catch (Exception e)
    @@ -161,11 +158,7 @@
    // do nothing
    }
    }
    - if (el == null)
    - {
    - this.features.put(EXPRESSION_FACTORY, "com.sun.el.ExpressionFactoryImpl");
    - el = (ExpressionFactory) this.featureInstance(EXPRESSION_FACTORY);
    - }
    +
    return el;
    }

    @@ -190,7 +183,7 @@
    {
    if (this.libraries.size() > 0)
    {
    - return new CompositeTagLibrary((TagLibrary[]) this.libraries.toArray(new TagLibrary[this.libraries.size()]));
    + return new CompositeTagLibrary(this.libraries.toArray(new TagLibrary[this.libraries.size()]));
    }
    return EMPTY_LIBRARY;
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EncodingHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EncodingHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EncodingHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EncodingHandler.java Thu Feb 12 01:23:54 2009
    @@ -23,7 +23,6 @@
    import javax.el.ELException;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EndElementInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EndElementInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EndElementInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/EndElementInstruction.java Thu Feb 12 01:23:54 2009
    @@ -19,17 +19,10 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.util.List;

    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    -import javax.el.ELException;
    -
    import javax.faces.context.FacesContext;
    -import javax.faces.context.ResponseWriter;
    -
    -import com.sun.facelets.el.ELAdaptor;
    -import com.sun.facelets.el.ELText;

    final class EndElementInstruction implements Instruction
    {

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Instruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Instruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Instruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/Instruction.java Thu Feb 12 01:23:54 2009
    @@ -22,7 +22,6 @@

    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    -
    import javax.faces.context.FacesContext;

    interface Instruction

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralAttributeInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralAttributeInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralAttributeInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralAttributeInstruction.java Thu Feb 12 01:23:54 2009
    @@ -19,13 +19,10 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.util.List;

    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    -
    import javax.faces.context.FacesContext;
    -import javax.faces.context.ResponseWriter;

    final class LiteralAttributeInstruction implements Instruction
    {

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralCommentInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralCommentInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralCommentInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralCommentInstruction.java Thu Feb 12 01:23:54 2009
    @@ -22,7 +22,6 @@

    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    -
    import javax.faces.context.FacesContext;

    final class LiteralCommentInstruction implements Instruction

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralTextInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralTextInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralTextInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/LiteralTextInstruction.java Thu Feb 12 01:23:54 2009
    @@ -19,13 +19,10 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.util.List;
    -
    -import javax.faces.context.FacesContext;
    -import javax.faces.context.ResponseWriter;

    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    +import javax.faces.context.FacesContext;

    final class LiteralTextInstruction implements Instruction
    {

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceHandler.java Thu Feb 12 01:23:54 2009
    @@ -26,10 +26,10 @@
    import javax.el.FunctionMapper;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.el.CompositeFunctionMapper;
    import com.sun.facelets.tag.TagLibrary;

    @@ -37,10 +37,10 @@
    {

    private final TagLibrary library;
    - private final Map ns;
    + private final Map<String, String> ns;
    private FaceletHandler next;

    - public NamespaceHandler(FaceletHandler next, TagLibrary library, Map ns)
    + public NamespaceHandler(FaceletHandler next, TagLibrary library, Map<String, String> ns)
    {
    this.library = library;
    this.ns = ns;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceManager.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceManager.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceManager.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceManager.java Thu Feb 12 01:23:54 2009
    @@ -43,14 +43,14 @@
    }
    }

    - private final List namespaces;
    + private final List<NS> namespaces;

    /**
    *
    */
    public NamespaceManager()
    {
    - this.namespaces = new ArrayList();
    + this.namespaces = new ArrayList<NS>();
    }

    public void reset()
    @@ -100,7 +100,7 @@
    NS ns = null;
    for (int i = this.namespaces.size() - 1; i >= 0; i--)
    {
    - ns = (NS) this.namespaces.get(i);
    + ns = this.namespaces.get(i);
    unit.setNamespace(ns.prefix, ns.namespace);
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceUnit.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceUnit.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceUnit.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/NamespaceUnit.java Thu Feb 12 01:23:54 2009
    @@ -22,6 +22,7 @@
    import java.util.Map;

    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.tag.TagLibrary;

    /**
    @@ -32,7 +33,7 @@
    final class NamespaceUnit extends CompilationUnit
    {

    - private final Map ns = new HashMap();
    + private final Map<String, String> ns = new HashMap<String, String>();
    private final TagLibrary library;

    public NamespaceUnit(TagLibrary library)

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/SAXCompiler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/SAXCompiler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/SAXCompiler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/SAXCompiler.java Thu Feb 12 01:23:54 2009
    @@ -27,6 +27,8 @@

    import javax.el.ELException;
    import javax.faces.FacesException;
    +import javax.faces.webapp.pdl.facelets.FaceletException;
    +import javax.faces.webapp.pdl.facelets.FaceletHandler;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    @@ -40,8 +42,6 @@
    import org.xml.sax.ext.LexicalHandler;
    import org.xml.sax.helpers.DefaultHandler;

    -import javax.faces.webapp.pdl.facelets.FaceletException;
    -import javax.faces.webapp.pdl.facelets.FaceletHandler;
    import com.sun.facelets.tag.Location;
    import com.sun.facelets.tag.Tag;
    import com.sun.facelets.tag.TagAttribute;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/StartElementInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/StartElementInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/StartElementInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/StartElementInstruction.java Thu Feb 12 01:23:54 2009
    @@ -19,17 +19,10 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.util.List;

    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    -import javax.el.ELException;
    -
    import javax.faces.context.FacesContext;
    -import javax.faces.context.ResponseWriter;
    -
    -import com.sun.facelets.el.ELAdaptor;
    -import com.sun.facelets.el.ELText;

    final class StartElementInstruction implements Instruction
    {

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagLibraryConfig.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagLibraryConfig.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagLibraryConfig.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagLibraryConfig.java Thu Feb 12 01:23:54 2009
    @@ -40,8 +40,8 @@
    import com.sun.facelets.tag.AbstractTagLibrary;
    import com.sun.facelets.tag.TagHandler;
    import com.sun.facelets.tag.TagLibrary;
    -import com.sun.facelets.util.ParameterCheck;
    import com.sun.facelets.util.Classpath;
    +import com.sun.facelets.util.ParameterCheck;
    import com.sun.facelets.util.ReflectionUtil;

    /**
    @@ -71,7 +71,7 @@
    this.addConverter(name, id);
    }

    - public void putConverter(String name, String id, Class handlerClass)
    + public void putConverter(String name, String id, Class<?> handlerClass)
    {
    ParameterCheck.notNull("name", name);
    ParameterCheck.notNull("id", id);
    @@ -86,7 +86,7 @@
    this.addValidator(name, id);
    }

    - public void putValidator(String name, String id, Class handlerClass)
    + public void putValidator(String name, String id, Class<?> handlerClass)
    {
    ParameterCheck.notNull("name", name);
    ParameterCheck.notNull("id", id);
    @@ -94,7 +94,7 @@
    this.addValidator(name, id, handlerClass);
    }

    - public void putTagHandler(String name, Class type)
    + public void putTagHandler(String name, Class<?> type)
    {
    ParameterCheck.notNull("name", name);
    ParameterCheck.notNull("type", type);
    @@ -108,7 +108,8 @@
    this.addComponent(name, componentType, rendererType);
    }

    - public void putComponent(String name, String componentType, String rendererType, Class handlerClass)
    + public void putComponent(String name, String componentType, String rendererType,
    + Class<? extends TagHandler> handlerClass)
    {
    ParameterCheck.notNull("name", name);
    ParameterCheck.notNull("componentType", componentType);
    @@ -133,8 +134,6 @@

    private static class LibraryHandler extends DefaultHandler
    {
    - private final String file;
    -
    private final URL source;

    private TagLibrary library;
    @@ -149,23 +148,20 @@

    private String validatorId;

    - private String componentClassName;
    -
    private String componentType;

    private String rendererType;

    private String functionName;

    - private Class handlerClass;
    + private Class<? extends TagHandler> handlerClass;

    - private Class functionClass;
    + private Class<?> functionClass;

    private String functionSignature;

    public LibraryHandler(URL source)
    {
    - this.file = source.getFile();
    this.source = source;
    this.buffer = new StringBuffer(64);
    }
    @@ -210,7 +206,7 @@
    else if ("function-class".equals(qName))
    {
    String className = this.captureBuffer();
    - this.functionClass = this.createClass(Object.class, className);
    + this.functionClass = createClass(Object.class, className);
    }
    else
    {
    @@ -234,7 +230,7 @@
    else if ("handler-class".equals(qName))
    {
    String cName = this.captureBuffer();
    - this.handlerClass = this.createClass(TagHandler.class, cName);
    + this.handlerClass = createClass(TagHandler.class, cName);
    }
    else if ("component".equals(qName))
    {
    @@ -291,7 +287,7 @@
    else if ("function-signature".equals(qName))
    {
    this.functionSignature = this.captureBuffer();
    - Method m = this.createMethod(this.functionClass, this.functionSignature);
    + Method m = createMethod(this.functionClass, this.functionSignature);
    impl.putFunction(this.functionName, m);
    }
    }
    @@ -316,9 +312,10 @@
    return s;
    }

    - private static Class createClass(Class type, String name) throws Exception
    + @SuppressWarnings("unchecked")
    + private static <T> Class<? extends T> createClass(Class<T> type, String name) throws Exception
    {
    - Class factory = ReflectionUtil.forName(name);
    + Class<? extends T> factory = (Class<? extends T>)ReflectionUtil.forName(name);
    if (!type.isAssignableFrom(factory))
    {
    throw new Exception(name + " must be an instance of " + type.getName());
    @@ -326,9 +323,8 @@
    return factory;
    }

    - private static Method createMethod(Class type, String s) throws Exception
    + private static Method createMethod(Class<?> type, String s) throws Exception
    {
    - Method m = null;
    int pos = s.indexOf(' ');
    if (pos == -1)
    {
    @@ -336,7 +332,6 @@
    }
    else
    {
    - String rt = s.substring(0, pos).trim();
    int pos2 = s.indexOf('(', pos + 1);
    if (pos2 == -1)
    {
    @@ -353,7 +348,7 @@
    else
    {
    String[] ps = s.substring(pos2 + 1, pos).trim().split(",");
    - Class[] pc;
    + Class<?>[] pc;
    if (ps.length == 1 && "".equals(ps[0]))
    {
    pc = new Class[0];
    @@ -385,7 +380,7 @@
    private void processLibraryClass() throws Exception
    {
    String name = this.captureBuffer();
    - Class type = this.createClass(TagLibrary.class, name);
    + Class<?> type = createClass(TagLibrary.class, name);
    this.library = (TagLibrary) type.newInstance();
    }

    @@ -409,7 +404,6 @@
    this.buffer.setLength(0);
    if ("tag".equals(qName))
    {
    - this.componentClassName = null;
    this.handlerClass = null;
    this.componentType = null;
    this.rendererType = null;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagUnit.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagUnit.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagUnit.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TagUnit.java Thu Feb 12 01:23:54 2009
    @@ -19,6 +19,7 @@
    package com.sun.facelets.compiler;

    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.tag.Tag;
    import com.sun.facelets.tag.TagConfig;
    import com.sun.facelets.tag.TagLibrary;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextInstruction.java Thu Feb 12 01:23:54 2009
    @@ -19,16 +19,13 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.util.List;

    import javax.el.ELContext;
    import javax.el.ELException;
    import javax.el.ExpressionFactory;
    -
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;

    -import com.sun.facelets.el.ELAdaptor;
    import com.sun.facelets.el.ELText;

    final class TextInstruction implements Instruction
    @@ -48,8 +45,7 @@
    ResponseWriter out = context.getResponseWriter();
    try
    {
    - ELContext elContext = ELAdaptor.getELContext(context);
    - txt.writeText(out, elContext);
    + txt.writeText(out, context.getELContext());
    // out.writeText(txt.toString(elContext), null);
    }
    catch (ELException e)

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextUnit.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextUnit.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextUnit.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/TextUnit.java Thu Feb 12 01:23:54 2009
    @@ -23,9 +23,8 @@
    import java.util.Stack;

    import javax.el.ELException;
    -
    -import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.el.ELText;
    import com.sun.facelets.tag.CompositeFaceletHandler;
    import com.sun.facelets.tag.Tag;
    @@ -44,11 +43,11 @@

    private final StringBuffer textBuffer;

    - private final List instructionBuffer;
    + private final List<Instruction> instructionBuffer;

    - private final Stack tags;
    + private final Stack<Tag> tags;

    - private final List children;
    + private final List<Object> children;

    private boolean startTagOpen;

    @@ -62,9 +61,9 @@
    this.id = id;
    this.buffer = new StringBuffer();
    this.textBuffer = new StringBuffer();
    - this.instructionBuffer = new ArrayList();
    - this.tags = new Stack();
    - this.children = new ArrayList();
    + this.instructionBuffer = new ArrayList<Instruction>();
    + this.tags = new Stack<Tag>();
    + this.children = new ArrayList<Object>();
    this.startTagOpen = false;
    }


    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructionHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructionHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructionHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructionHandler.java Thu Feb 12 01:23:54 2009
    @@ -24,9 +24,9 @@
    import javax.el.ELException;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    +
    import com.sun.facelets.el.ELText;
    import com.sun.facelets.tag.jsf.ComponentSupport;
    import com.sun.facelets.util.FastWriter;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructions.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructions.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructions.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIInstructions.java Thu Feb 12 01:23:54 2009
    @@ -20,7 +20,6 @@

    import java.io.IOException;
    import java.util.Arrays;
    -import java.util.List;

    import javax.faces.context.FacesContext;


    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILeaf.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILeaf.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILeaf.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILeaf.java Thu Feb 12 01:23:54 2009
    @@ -29,27 +29,26 @@
    import javax.faces.component.UIComponent;
    import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    -import javax.faces.context.ResponseWriter;
    import javax.faces.el.ValueBinding;
    import javax.faces.event.AbortProcessingException;
    import javax.faces.event.FacesEvent;
    import javax.faces.event.FacesListener;
    import javax.faces.render.Renderer;

    -import com.sun.facelets.el.ELText;
    -
    class UILeaf extends UIComponentBase
    {

    - private final static Map facets = new HashMap()
    + private final static Map<String, UIComponent> facets = new HashMap<String, UIComponent>()
    {

    - public void putAll(Map map)
    + @Override
    + public void putAll(Map<? extends String, ? extends UIComponent> map)
    {
    // do nothing
    }

    - public Object put(Object name, Object value)
    + @Override
    + public UIComponent put(String name, UIComponent value)
    {
    return null;
    }
    @@ -57,21 +56,27 @@

    private UIComponent parent;

    + @Override
    + @SuppressWarnings("deprecation")
    public ValueBinding getValueBinding(String binding)
    {
    return null;
    }

    + @Override
    + @SuppressWarnings("deprecation")
    public void setValueBinding(String name, ValueBinding binding)
    {
    // do nothing
    }

    + @Override
    public ValueExpression getValueExpression(String name)
    {
    return null;
    }

    + @Override
    public void setValueExpression(String name, ValueExpression arg1)
    {
    // do nothing
    @@ -82,176 +87,214 @@
    return "facelets.LiteralText";
    }

    + @Override
    public UIComponent getParent()
    {
    return this.parent;
    }

    + @Override
    public void setParent(UIComponent parent)
    {
    this.parent = parent;
    }

    + @Override
    public boolean isRendered()
    {
    return true;
    }

    + @Override
    public void setRendered(boolean rendered)
    {
    // do nothing
    }

    + @Override
    public String getRendererType()
    {
    return null;
    }

    + @Override
    public void setRendererType(String rendererType)
    {
    // do nothing
    }

    + @Override
    public boolean getRendersChildren()
    {
    return true;
    }

    - public List getChildren()
    + @Override
    + public List<UIComponent> getChildren()
    {
    - return Collections.EMPTY_LIST;
    + List<UIComponent> children = Collections.emptyList();
    + return children;
    }

    + @Override
    public int getChildCount()
    {
    return 0;
    }

    + @Override
    public UIComponent findComponent(String id)
    {
    return null;
    }

    - public Map getFacets()
    + @Override
    + public Map<String, UIComponent> getFacets()
    {
    return facets;
    }

    + @Override
    public int getFacetCount()
    {
    return 0;
    }

    + @Override
    public UIComponent getFacet(String name)
    {
    return null;
    }

    - public Iterator getFacetsAndChildren()
    + @Override
    + public Iterator<UIComponent> getFacetsAndChildren()
    {
    - return Collections.EMPTY_LIST.iterator();
    + List<UIComponent> childrenAndFacets = Collections.emptyList();
    +
    + return childrenAndFacets.iterator();
    }

    + @Override
    public void broadcast(FacesEvent event) throws AbortProcessingException
    {
    // do nothing
    }

    + @Override
    public void decode(FacesContext faces)
    {
    // do nothing
    }

    + @Override
    public void encodeBegin(FacesContext faces) throws IOException
    {
    // do nothing
    }

    + @Override
    public void encodeChildren(FacesContext faces) throws IOException
    {
    // do nothing
    }

    + @Override
    public void encodeEnd(FacesContext faces) throws IOException
    {
    // do nothing
    }

    + @Override
    public void encodeAll(FacesContext faces) throws IOException
    {
    this.encodeBegin(faces);
    }

    + @Override
    protected void addFacesListener(FacesListener faces)
    {
    // do nothing
    }

    + @Override
    protected FacesListener[] getFacesListeners(Class faces)
    {
    return null;
    }

    + @Override
    protected void removeFacesListener(FacesListener faces)
    {
    // do nothing
    }

    + @Override
    public void queueEvent(FacesEvent event)
    {
    // do nothing
    }

    + @Override
    public void processRestoreState(FacesContext faces, Object state)
    {
    // do nothing
    }

    + @Override
    public void processDecodes(FacesContext faces)
    {
    // do nothing
    }

    + @Override
    public void processValidators(FacesContext faces)
    {
    // do nothing
    }

    + @Override
    public void processUpdates(FacesContext faces)
    {
    // do nothing
    }

    + @Override
    public Object processSaveState(FacesContext faces)
    {
    return null;
    }

    + @Override
    protected FacesContext getFacesContext()
    {
    return FacesContext.getCurrentInstance();
    }

    + @Override
    protected Renderer getRenderer(FacesContext faces)
    {
    return null;
    }

    + @Override
    public Object saveState(FacesContext faces)
    {
    return null;
    }

    + @Override
    public void restoreState(FacesContext faces, Object state)
    {
    // do nothing
    }

    + @Override
    public boolean isTransient()
    {
    return true;
    }

    + @Override
    public void setTransient(boolean tranzient)
    {
    // do nothing

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILiteralTextHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILiteralTextHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILiteralTextHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UILiteralTextHandler.java Thu Feb 12 01:23:54 2009
    @@ -18,17 +18,14 @@
    */
    package com.sun.facelets.compiler;

    -import javax.faces.component.UIComponent;
    -
    import java.io.IOException;

    import javax.el.ELException;
    import javax.faces.FacesException;
    -
    +import javax.faces.component.UIComponent;
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    -import javax.faces.webapp.pdl.facelets.FaceletHandler;
    -import com.sun.facelets.tag.TextHandler;
    +
    import com.sun.facelets.tag.jsf.ComponentSupport;

    final class UILiteralTextHandler extends AbstractUIHandler

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIText.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIText.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIText.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UIText.java Thu Feb 12 01:23:54 2009
    @@ -21,11 +21,9 @@
    import java.io.IOException;

    import javax.el.ELException;
    -import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;

    -import com.sun.facelets.el.ELAdaptor;
    import com.sun.facelets.el.ELText;

    /**
    @@ -34,51 +32,55 @@
    */
    final class UIText extends UILeaf
    {
    + private final String _alias;

    - private final ELText txt;
    -
    - private final String alias;
    + private final ELText _txt;

    public UIText(String alias, ELText txt)
    {
    - this.txt = txt;
    - this.alias = alias;
    + _txt = txt;
    + _alias = alias;
    }

    + @Override
    public String getFamily()
    {
    return null;
    }

    + @Override
    public void encodeBegin(FacesContext context) throws IOException
    {
    ResponseWriter out = context.getResponseWriter();
    try
    {
    - txt.write(out, ELAdaptor.getELContext(context));
    + _txt.write(out, context.getELContext());
    }
    catch (ELException e)
    {
    - throw new ELException(this.alias + ": " + e.getMessage(), e.getCause());
    + throw new ELException(_alias + ": " + e.getMessage(), e.getCause());
    }
    catch (Exception e)
    {
    - throw new ELException(this.alias + ": " + e.getMessage(), e);
    + throw new ELException(_alias + ": " + e.getMessage(), e);
    }
    }

    + @Override
    public String getRendererType()
    {
    return null;
    }

    + @Override
    public boolean getRendersChildren()
    {
    return true;
    }

    + @Override
    public String toString()
    {
    - return this.txt.toString();
    + return _txt.toString();
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UITextHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UITextHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UITextHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/UITextHandler.java Thu Feb 12 01:23:54 2009
    @@ -19,18 +19,15 @@
    package com.sun.facelets.compiler;

    import java.io.IOException;
    -import java.io.StringWriter;
    import java.io.Writer;

    import javax.el.ELException;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    -import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.el.ELText;
    -import com.sun.facelets.tag.TextHandler;
    import com.sun.facelets.tag.jsf.ComponentSupport;
    import com.sun.facelets.util.FastWriter;


    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/XMLInstruction.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/XMLInstruction.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/XMLInstruction.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/compiler/XMLInstruction.java Thu Feb 12 01:23:54 2009
    @@ -25,31 +25,29 @@
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;

    -import com.sun.facelets.el.ELAdaptor;
    import com.sun.facelets.el.ELText;

    public class XMLInstruction implements Instruction
    {
    -
    private final static char[] STOP = new char[0];

    - private final ELText text;
    + private final ELText _text;

    public XMLInstruction(ELText text)
    {
    - this.text = text;
    + _text = text;
    }

    public void write(FacesContext context) throws IOException
    {
    ResponseWriter rw = context.getResponseWriter();
    rw.writeText(STOP, 0, 0); // hack to get closing elements
    - this.text.write(rw, ELAdaptor.getELContext(context));
    + _text.write(rw, context.getELContext());
    }

    public Instruction apply(ExpressionFactory factory, ELContext ctx)
    {
    - return new XMLInstruction(text.apply(factory, ctx));
    + return new XMLInstruction(_text.apply(factory, ctx));
    }

    public boolean isLiteral()

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/RepeatRenderer.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/RepeatRenderer.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/RepeatRenderer.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/RepeatRenderer.java Thu Feb 12 01:23:54 2009
    @@ -19,7 +19,6 @@
    package com.sun.facelets.component;

    import java.io.IOException;
    -import java.util.Iterator;
    import java.util.Map;

    import javax.faces.component.UIComponent;
    @@ -27,9 +26,6 @@
    import javax.faces.context.ResponseWriter;
    import javax.faces.render.Renderer;

    -import com.sun.facelets.tag.jsf.ComponentSupport;
    -import com.sun.facelets.util.FacesAPI;
    -
    public class RepeatRenderer extends Renderer
    {

    @@ -38,16 +34,18 @@
    super();
    }

    + @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException
    {

    }

    + @Override
    public void encodeChildren(FacesContext context, UIComponent component) throws IOException
    {
    if (component.getChildCount() > 0)
    {
    - Map a = component.getAttributes();
    + Map<String, Object> a = component.getAttributes();
    String tag = (String) a.get("alias.element");
    if (tag != null)
    {
    @@ -68,20 +66,10 @@
    }
    }
    }
    -
    - Iterator itr = component.getChildren().iterator();
    - UIComponent c;
    - while (itr.hasNext())
    +
    + for (UIComponent child : component.getChildren())
    {
    - c = (UIComponent) itr.next();
    - if (FacesAPI.getVersion() >= 12)
    - {
    - c.encodeAll(context);
    - }
    - else
    - {
    - ComponentSupport.encodeRecursive(context, c);
    - }
    + child.encodeAll(context);
    }

    if (tag != null)
    @@ -91,11 +79,13 @@
    }
    }

    + @Override
    public void encodeEnd(FacesContext context, UIComponent component) throws IOException
    {

    }

    + @Override
    public boolean getRendersChildren()
    {
    return true;
  • Slessard at Feb 12, 2009 at 1:24 am
    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/UIRepeat.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/UIRepeat.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/UIRepeat.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/component/UIRepeat.java Thu Feb 12 01:23:54 2009
    @@ -27,6 +27,7 @@
    import java.util.List;
    import java.util.Map;

    +import javax.el.ValueExpression;
    import javax.faces.FacesException;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.EditableValueHolder;
    @@ -35,7 +36,6 @@
    import javax.faces.component.UIComponentBase;
    import javax.faces.component.UIData;
    import javax.faces.context.FacesContext;
    -import javax.faces.el.ValueBinding;
    import javax.faces.event.AbortProcessingException;
    import javax.faces.event.FacesEvent;
    import javax.faces.event.FacesListener;
    @@ -47,38 +47,40 @@
    import javax.faces.model.ScalarDataModel;
    import javax.faces.render.Renderer;

    -import com.sun.facelets.tag.jsf.ComponentSupport;
    -import com.sun.facelets.util.FacesAPI;
    -
    public class UIRepeat extends UIComponentBase implements NamingContainer
    {
    -
    public static final String COMPONENT_TYPE = "facelets.ui.Repeat";

    public static final String COMPONENT_FAMILY = "facelets";

    - private final static DataModel EMPTY_MODEL = new ListDataModel(Collections.EMPTY_LIST);
    + private final static DataModel<?> EMPTY_MODEL = new ListDataModel<Object>(Collections.emptyList());

    - // our data
    - private Object value;
    + private final static SavedState NullState = new SavedState();

    - private transient DataModel model;
    + private Map<String, SavedState> _childState;
    +
    + // our data
    + private Object _value;

    // variables
    - private String var;
    + private String _var;

    - private String varStatus;
    + //FIXME: varStatus isn't used, should support be added? private String _varStatus;

    - private int index = -1;
    + private int _index = -1;

    // scoping
    - private int offset = -1;
    + private int _offset = -1;
    +
    + private int _size = -1;

    - private int size = -1;
    + private transient StringBuffer _buffer;
    + private transient DataModel<?> _model;
    + private transient Object _origValue;

    public UIRepeat()
    {
    - this.setRendererType("facelets.ui.Repeat");
    + setRendererType("facelets.ui.Repeat");
    }

    public String getFamily()
    @@ -88,232 +90,227 @@

    public int getOffset()
    {
    - if (this.offset != -1)
    + if (_offset != -1)
    {
    - return this.offset;
    + return _offset;
    }
    - ValueBinding vb = this.getValueBinding("offset");
    - if (vb != null)
    +
    + ValueExpression ve = getValueExpression("offset");
    + if (ve != null)
    {
    - return ((Integer) vb.getValue(FacesContext.getCurrentInstance())).intValue();
    + return ((Integer)ve.getValue(getFacesContext().getELContext())).intValue();
    }
    +
    return 0;
    }

    public void setOffset(int offset)
    {
    - this.offset = offset;
    + _offset = offset;
    }

    public int getSize()
    {
    - if (this.size != -1)
    + if (_size != -1)
    {
    - return this.size;
    + return _size;
    }
    - ValueBinding vb = this.getValueBinding("size");
    - if (vb != null)
    +
    + ValueExpression ve = getValueExpression("size");
    + if (ve != null)
    {
    - return ((Integer) vb.getValue(FacesContext.getCurrentInstance())).intValue();
    + return ((Integer)ve.getValue(getFacesContext().getELContext())).intValue();
    }
    +
    return -1;
    }

    public void setSize(int size)
    {
    - this.size = size;
    + _size = size;
    }

    public String getVar()
    {
    - return this.var;
    + return _var;
    }

    public void setVar(String var)
    {
    - this.var = var;
    + _var = var;
    }

    - private void resetDataModel()
    + private synchronized void setDataModel(DataModel<?> model)
    {
    - if (this.isNestedInIterator())
    - {
    - this.setDataModel(null);
    - }
    - }
    -
    - private synchronized void setDataModel(DataModel model)
    - {
    - this.model = model;
    + _model = model;
    }

    - private synchronized DataModel getDataModel()
    + @SuppressWarnings("unchecked")
    + private synchronized DataModel<?> getDataModel()
    {
    - if (this.model == null)
    + if (_model == null)
    {
    - Object val = this.getValue();
    + Object val = getValue();
    if (val == null)
    {
    - this.model = EMPTY_MODEL;
    + _model = EMPTY_MODEL;
    }
    else if (val instanceof DataModel)
    {
    - this.model = (DataModel) val;
    + _model = (DataModel<?>) val;
    }
    else if (val instanceof List)
    {
    - this.model = new ListDataModel((List) val);
    + _model = new ListDataModel<Object>((List<Object>) val);
    }
    else if (Object[].class.isAssignableFrom(val.getClass()))
    {
    - this.model = new ArrayDataModel((Object[]) val);
    + _model = new ArrayDataModel<Object>((Object[]) val);
    }
    else if (val instanceof ResultSet)
    {
    - this.model = new ResultSetDataModel((ResultSet) val);
    + _model = new ResultSetDataModel((ResultSet) val);
    }
    else
    {
    - this.model = new ScalarDataModel(val);
    + _model = new ScalarDataModel(val);
    }
    }
    - return this.model;
    + return _model;
    }

    public Object getValue()
    {
    - if (this.value == null)
    + if (_value == null)
    {
    - ValueBinding vb = this.getValueBinding("value");
    - if (vb != null)
    + ValueExpression ve = getValueExpression("value");
    + if (ve != null)
    {
    - return vb.getValue(FacesContext.getCurrentInstance());
    + return ve.getValue(getFacesContext().getELContext());
    }
    }
    - return this.value;
    +
    + return _value;
    }

    public void setValue(Object value)
    {
    - this.value = value;
    - }
    -
    - private transient StringBuffer buffer;
    -
    - private StringBuffer getBuffer()
    - {
    - if (this.buffer == null)
    - {
    - this.buffer = new StringBuffer();
    - }
    - this.buffer.setLength(0);
    - return this.buffer;
    + _value = value;
    }

    + @Override
    public String getClientId(FacesContext faces)
    {
    String id = super.getClientId(faces);
    - if (this.index >= 0)
    + if (_index >= 0)
    {
    - id = this.getBuffer().append(id).append(NamingContainer.SEPARATOR_CHAR).append(this.index).toString();
    + id = _getBuffer().append(id).append(NamingContainer.SEPARATOR_CHAR).append(_index).toString();
    }
    return id;
    }

    - private transient Object origValue;
    -
    - private void captureOrigValue()
    + private void _captureOrigValue()
    {
    - if (this.var != null)
    + if (_var != null)
    {
    - FacesContext faces = FacesContext.getCurrentInstance();
    - Map attrs = faces.getExternalContext().getRequestMap();
    - this.origValue = attrs.get(this.var);
    + _origValue = getFacesContext().getExternalContext().getRequestMap().get(_var);
    }
    }

    - private void restoreOrigValue()
    + private StringBuffer _getBuffer()
    {
    - if (this.var != null)
    + if (_buffer == null)
    {
    - FacesContext faces = FacesContext.getCurrentInstance();
    - Map attrs = faces.getExternalContext().getRequestMap();
    - if (this.origValue != null)
    - {
    - attrs.put(this.var, this.origValue);
    - }
    - else
    - {
    - attrs.remove(this.var);
    - }
    + _buffer = new StringBuffer();
    }
    +
    + _buffer.setLength(0);
    +
    + return _buffer;
    }

    - private Map childState;
    -
    - private Map getChildState()
    + private Map<String, SavedState> _getChildState()
    {
    - if (this.childState == null)
    + if (_childState == null)
    {
    - this.childState = new HashMap();
    + _childState = new HashMap<String, SavedState>();
    }
    - return this.childState;
    +
    + return _childState;
    }

    - private void saveChildState()
    + private boolean _isIndexAvailable()
    {
    - if (this.getChildCount() > 0)
    - {
    -
    - FacesContext faces = FacesContext.getCurrentInstance();
    + return getDataModel().isRowAvailable();
    + }

    - Iterator itr = this.getChildren().iterator();
    - while (itr.hasNext())
    + private boolean _isNestedInIterator()
    + {
    + UIComponent parent = getParent();
    + while (parent != null)
    + {
    + if (parent instanceof UIData || parent instanceof UIRepeat)
    {
    - this.saveChildState(faces, (UIComponent) itr.next());
    + return true;
    }
    + parent = parent.getParent();
    }
    + return false;
    }

    - private void saveChildState(FacesContext faces, UIComponent c)
    + private boolean _keepSaved(FacesContext context)
    {
    -
    - if (c instanceof EditableValueHolder && !c.isTransient())
    + for (String clientId : _getChildState().keySet())
    {
    - String clientId = c.getClientId(faces);
    - SavedState ss = (SavedState) this.getChildState().get(clientId);
    - if (ss == null)
    + for (FacesMessage message : context.getMessageList(clientId))
    {
    - ss = new SavedState();
    - this.getChildState().put(clientId, ss);
    + if (message.getSeverity().compareTo(FacesMessage.SEVERITY_ERROR) >= 0)
    + {
    + return true;
    + }
    }
    - ss.populate((EditableValueHolder) c);
    }
    +
    + return _isNestedInIterator();
    + }

    - // continue hack
    - Iterator itr = c.getFacetsAndChildren();
    - while (itr.hasNext())
    + private void _resetDataModel()
    + {
    + if (_isNestedInIterator())
    {
    - saveChildState(faces, (UIComponent) itr.next());
    + setDataModel(null);
    }
    }

    - private void restoreChildState()
    + private void _restoreOrigValue()
    {
    - if (this.getChildCount() > 0)
    + if (_var != null)
    {
    + Map<String, Object> attrs = getFacesContext().getExternalContext().getRequestMap();
    + if (_origValue != null)
    + {
    + attrs.put(_var, _origValue);
    + }
    + else
    + {
    + attrs.remove(_var);
    + }
    + }
    + }

    - FacesContext faces = FacesContext.getCurrentInstance();
    -
    - Iterator itr = this.getChildren().iterator();
    - while (itr.hasNext())
    + private void _restoreChildState()
    + {
    + if (getChildCount() > 0)
    + {
    + FacesContext context = getFacesContext();
    + for (UIComponent child : getChildren())
    {
    - this.restoreChildState(faces, (UIComponent) itr.next());
    + _restoreChildState(context, child);
    }
    }
    }

    - private void restoreChildState(FacesContext faces, UIComponent c)
    + private void _restoreChildState(FacesContext faces, UIComponent c)
    {
    // reset id
    String id = c.getId();
    @@ -324,7 +321,7 @@
    {
    EditableValueHolder evh = (EditableValueHolder) c;
    String clientId = c.getClientId(faces);
    - SavedState ss = (SavedState) this.getChildState().get(clientId);
    + SavedState ss = _getChildState().get(clientId);
    if (ss != null)
    {
    ss.apply(evh);
    @@ -336,97 +333,87 @@
    }

    // continue hack
    - Iterator itr = c.getFacetsAndChildren();
    + Iterator<UIComponent> itr = c.getFacetsAndChildren();
    while (itr.hasNext())
    {
    - restoreChildState(faces, (UIComponent) itr.next());
    + _restoreChildState(faces, itr.next());
    }
    }

    - private boolean keepSaved(FacesContext context)
    + private void _saveChildState()
    {
    -
    - Iterator clientIds = this.getChildState().keySet().iterator();
    - while (clientIds.hasNext())
    + if (getChildCount() > 0)
    {
    - String clientId = (String) clientIds.next();
    - Iterator messages = context.getMessages(clientId);
    - while (messages.hasNext())
    + FacesContext context = getFacesContext();
    + for (UIComponent child : getChildren())
    {
    - FacesMessage message = (FacesMessage) messages.next();
    - if (message.getSeverity().compareTo(FacesMessage.SEVERITY_ERROR) >= 0)
    - {
    - return (true);
    - }
    + _saveChildState(context, child);
    }
    }
    - return (isNestedInIterator());
    }

    - private boolean isNestedInIterator()
    + private void _saveChildState(FacesContext faces, UIComponent c)
    {
    - UIComponent parent = this.getParent();
    - while (parent != null)
    + if (c instanceof EditableValueHolder && !c.isTransient())
    {
    - if (parent instanceof UIData || parent instanceof UIRepeat)
    + String clientId = c.getClientId(faces);
    + SavedState ss = (SavedState) _getChildState().get(clientId);
    + if (ss == null)
    {
    - return true;
    + ss = new SavedState();
    + _getChildState().put(clientId, ss);
    }
    - parent = parent.getParent();
    +
    + ss.populate((EditableValueHolder) c);
    + }
    +
    + // continue hack
    + Iterator<UIComponent> itr = c.getFacetsAndChildren();
    + while (itr.hasNext())
    + {
    + _saveChildState(faces, itr.next());
    }
    - return false;
    }

    - private void setIndex(int index)
    + private void _setIndex(int index)
    {
    -
    // save child state
    - this.saveChildState();
    + _saveChildState();

    - this.index = index;
    - DataModel localModel = getDataModel();
    + _index = index;
    +
    + DataModel<?> localModel = getDataModel();
    localModel.setRowIndex(index);

    - if (this.index != -1 && this.var != null && localModel.isRowAvailable())
    + if (_index != -1 && _var != null && localModel.isRowAvailable())
    {
    - FacesContext faces = FacesContext.getCurrentInstance();
    - Map attrs = faces.getExternalContext().getRequestMap();
    - attrs.put(var, localModel.getRowData());
    + getFacesContext().getExternalContext().getRequestMap().put(_var, localModel.getRowData());
    }

    // restore child state
    - this.restoreChildState();
    - }
    -
    - private boolean isIndexAvailable()
    - {
    - return this.getDataModel().isRowAvailable();
    + _restoreChildState();
    }

    public void process(FacesContext faces, PhaseId phase)
    {
    -
    // stop if not rendered
    - if (!this.isRendered())
    + if (!isRendered())
    return;

    // clear datamodel
    - this.resetDataModel();
    + _resetDataModel();

    // reset index
    - this.captureOrigValue();
    - this.setIndex(-1);
    + _captureOrigValue();
    + _setIndex(-1);

    try
    {
    // has children
    - if (this.getChildCount() > 0)
    + if (getChildCount() > 0)
    {
    - Iterator itr;
    - UIComponent c;
    -
    - int i = this.getOffset();
    - int end = this.getSize();
    + int i = getOffset();
    + int end = getSize();
    end = (end >= 0) ? i + end : Integer.MAX_VALUE - 1;

    // grab renderer
    @@ -437,8 +424,8 @@
    renderer = getRenderer(faces);
    }

    - this.setIndex(i);
    - while (i <= end && this.isIndexAvailable())
    + _setIndex(i);
    + while (i <= end && _isIndexAvailable())
    {

    if (PhaseId.RENDER_RESPONSE.equals(phase) && renderer != null)
    @@ -447,37 +434,30 @@
    }
    else
    {
    - itr = this.getChildren().iterator();
    - while (itr.hasNext())
    + for (UIComponent child : getChildren())
    {
    - c = (UIComponent) itr.next();
    if (PhaseId.APPLY_REQUEST_VALUES.equals(phase))
    {
    - c.processDecodes(faces);
    + child.processDecodes(faces);
    }
    else if (PhaseId.PROCESS_VALIDATIONS.equals(phase))
    {
    - c.processValidators(faces);
    + child.processValidators(faces);
    }
    else if (PhaseId.UPDATE_MODEL_VALUES.equals(phase))
    {
    - c.processUpdates(faces);
    + child.processUpdates(faces);
    }
    else if (PhaseId.RENDER_RESPONSE.equals(phase))
    {
    - if (FacesAPI.getVersion() >= 12)
    - {
    - c.encodeAll(faces);
    - }
    - else
    - {
    - ComponentSupport.encodeRecursive(faces, c);
    - }
    + child.encodeAll(faces);
    }
    }
    }
    +
    i++;
    - this.setIndex(i);
    +
    + _setIndex(i);
    }
    }
    }
    @@ -487,8 +467,8 @@
    }
    finally
    {
    - this.setIndex(-1);
    - this.restoreOrigValue();
    + _setIndex(-1);
    + _restoreOrigValue();
    }
    }

    @@ -530,182 +510,193 @@
    // return false;
    // }

    + @Override
    public void processDecodes(FacesContext faces)
    {
    - if (!this.isRendered())
    + if (!isRendered())
    + {
    return;
    - this.setDataModel(null);
    - if (!this.keepSaved(faces))
    - this.childState = null;
    - this.process(faces, PhaseId.APPLY_REQUEST_VALUES);
    - this.decode(faces);
    + }
    +
    + setDataModel(null);
    + if (!_keepSaved(faces))
    + {
    + _childState = null;
    + }
    +
    + process(faces, PhaseId.APPLY_REQUEST_VALUES);
    + decode(faces);
    }

    + @Override
    public void processUpdates(FacesContext faces)
    {
    - if (!this.isRendered())
    + if (!isRendered())
    + {
    return;
    - this.resetDataModel();
    - this.process(faces, PhaseId.UPDATE_MODEL_VALUES);
    + }
    +
    + _resetDataModel();
    + process(faces, PhaseId.UPDATE_MODEL_VALUES);
    }

    + @Override
    public void processValidators(FacesContext faces)
    {
    - if (!this.isRendered())
    + if (!isRendered())
    + {
    return;
    - this.resetDataModel();
    - this.process(faces, PhaseId.PROCESS_VALIDATIONS);
    + }
    +
    + _resetDataModel();
    + process(faces, PhaseId.PROCESS_VALIDATIONS);
    }

    - private final static SavedState NullState = new SavedState();
    -
    // from RI
    private final static class SavedState implements Serializable
    {
    -
    - private Object submittedValue;
    + private boolean _localValueSet;
    + private Object _submittedValue;
    + private boolean _valid = true;
    + private Object _value;

    private static final long serialVersionUID = 2920252657338389849L;

    Object getSubmittedValue()
    {
    - return (this.submittedValue);
    + return (_submittedValue);
    }

    void setSubmittedValue(Object submittedValue)
    {
    - this.submittedValue = submittedValue;
    + _submittedValue = submittedValue;
    }

    - private boolean valid = true;
    -
    boolean isValid()
    {
    - return (this.valid);
    + return (_valid);
    }

    void setValid(boolean valid)
    {
    - this.valid = valid;
    + _valid = valid;
    }

    - private Object value;
    -
    Object getValue()
    {
    - return (this.value);
    + return _value;
    }

    public void setValue(Object value)
    {
    - this.value = value;
    + _value = value;
    }

    - private boolean localValueSet;
    -
    boolean isLocalValueSet()
    {
    - return (this.localValueSet);
    + return _localValueSet;
    }

    public void setLocalValueSet(boolean localValueSet)
    {
    - this.localValueSet = localValueSet;
    + _localValueSet = localValueSet;
    }

    + @Override
    public String toString()
    {
    - return ("submittedValue: " + submittedValue + " value: " + value + " localValueSet: " + localValueSet);
    + return ("submittedValue: " + _submittedValue + " value: " + _value + " localValueSet: " + _localValueSet);
    }

    public void populate(EditableValueHolder evh)
    {
    - this.value = evh.getValue();
    - this.valid = evh.isValid();
    - this.submittedValue = evh.getSubmittedValue();
    - this.localValueSet = evh.isLocalValueSet();
    + _value = evh.getValue();
    + _valid = evh.isValid();
    + _submittedValue = evh.getSubmittedValue();
    + _localValueSet = evh.isLocalValueSet();
    }

    public void apply(EditableValueHolder evh)
    {
    - evh.setValue(this.value);
    - evh.setValid(this.valid);
    - evh.setSubmittedValue(this.submittedValue);
    - evh.setLocalValueSet(this.localValueSet);
    + evh.setValue(_value);
    + evh.setValid(_valid);
    + evh.setSubmittedValue(_submittedValue);
    + evh.setLocalValueSet(_localValueSet);
    }
    -
    }

    private final class IndexedEvent extends FacesEvent
    {
    + private final FacesEvent _target;

    - private final FacesEvent target;
    -
    - private final int index;
    + private final int _index;

    public IndexedEvent(UIRepeat owner, FacesEvent target, int index)
    {
    super(owner);
    - this.target = target;
    - this.index = index;
    + _target = target;
    + _index = index;
    }

    + @Override
    public PhaseId getPhaseId()
    {
    - return (this.target.getPhaseId());
    + return _target.getPhaseId();
    }

    + @Override
    public void setPhaseId(PhaseId phaseId)
    {
    - this.target.setPhaseId(phaseId);
    + _target.setPhaseId(phaseId);
    }

    public boolean isAppropriateListener(FacesListener listener)
    {
    - return this.target.isAppropriateListener(listener);
    + return _target.isAppropriateListener(listener);
    }

    public void processListener(FacesListener listener)
    {
    - UIRepeat owner = (UIRepeat) this.getComponent();
    - int prevIndex = owner.index;
    + UIRepeat owner = (UIRepeat) getComponent();
    + int prevIndex = owner._index;
    try
    {
    - owner.setIndex(this.index);
    - if (owner.isIndexAvailable())
    + owner._setIndex(_index);
    + if (owner._isIndexAvailable())
    {
    - this.target.processListener(listener);
    + _target.processListener(listener);
    }
    }
    finally
    {
    - owner.setIndex(prevIndex);
    + owner._setIndex(prevIndex);
    }
    }

    public int getIndex()
    {
    - return index;
    + return _index;
    }

    public FacesEvent getTarget()
    {
    - return target;
    + return _target;
    }

    }

    + @Override
    public void broadcast(FacesEvent event) throws AbortProcessingException
    {
    if (event instanceof IndexedEvent)
    {
    IndexedEvent idxEvent = (IndexedEvent) event;
    - this.resetDataModel();
    - int prevIndex = this.index;
    + _resetDataModel();
    + int prevIndex = _index;
    try
    {
    - this.setIndex(idxEvent.getIndex());
    - if (this.isIndexAvailable())
    + _setIndex(idxEvent.getIndex());
    + if (_isIndexAvailable())
    {
    FacesEvent target = idxEvent.getTarget();
    target.getComponent().broadcast(target);
    @@ -713,7 +704,7 @@
    }
    finally
    {
    - this.setIndex(prevIndex);
    + _setIndex(prevIndex);
    }
    }
    else
    @@ -722,58 +713,68 @@
    }
    }

    + @Override
    public void queueEvent(FacesEvent event)
    {
    - super.queueEvent(new IndexedEvent(this, event, this.index));
    + super.queueEvent(new IndexedEvent(this, event, _index));
    }

    + @SuppressWarnings("unchecked")
    + @Override
    public void restoreState(FacesContext faces, Object object)
    {
    Object[] state = (Object[]) object;
    super.restoreState(faces, state[0]);
    - this.childState = (Map) state[1];
    - this.offset = ((Integer) state[2]).intValue();
    - this.size = ((Integer) state[3]).intValue();
    - this.var = (String) state[4];
    - this.value = state[5];
    + _childState = (Map<String, SavedState>) state[1];
    + _offset = ((Integer) state[2]).intValue();
    + _size = ((Integer) state[3]).intValue();
    + _var = (String) state[4];
    + _value = state[5];
    }

    + @Override
    public Object saveState(FacesContext faces)
    {
    Object[] state = new Object[6];
    state[0] = super.saveState(faces);
    - state[1] = this.childState;
    - state[2] = new Integer(this.offset);
    - state[3] = new Integer(this.size);
    - state[4] = this.var;
    - state[5] = this.value;
    + state[1] = _childState;
    + state[2] = new Integer(_offset);
    + state[3] = new Integer(_size);
    + state[4] = _var;
    + state[5] = _value;
    return state;
    }

    + @Override
    public void encodeChildren(FacesContext faces) throws IOException
    {
    if (!isRendered())
    {
    return;
    }
    - this.setDataModel(null);
    - if (!this.keepSaved(faces))
    +
    + setDataModel(null);
    +
    + if (!_keepSaved(faces))
    {
    - this.childState = null;
    + _childState = null;
    }
    - this.process(faces, PhaseId.RENDER_RESPONSE);
    +
    + process(faces, PhaseId.RENDER_RESPONSE);
    }

    + @Override
    public boolean getRendersChildren()
    {
    - Renderer renderer = null;
    if (getRendererType() != null)
    {
    - if (null != (renderer = getRenderer(getFacesContext())))
    + Renderer renderer = getRenderer(getFacesContext());
    + if (renderer != null)
    {
    return renderer.getRendersChildren();
    }
    }
    +
    return true;
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java Thu Feb 12 01:23:54 2009
    @@ -24,7 +24,6 @@
    import java.io.ObjectOutput;
    import java.lang.reflect.Method;
    import java.util.HashMap;
    -import java.util.Iterator;
    import java.util.Map;

    import javax.el.FunctionMapper;
    @@ -42,10 +41,9 @@
    */
    public final class DefaultFunctionMapper extends FunctionMapper implements Externalizable
    {
    -
    private static final long serialVersionUID = 1L;

    - private Map functions = null;
    + private Map<String, Function> _functions = null;

    /*
    * (non-Javadoc)
    @@ -54,24 +52,26 @@
    */
    public Method resolveFunction(String prefix, String localName)
    {
    - if (this.functions != null)
    + if (_functions != null)
    {
    - Function f = (Function) this.functions.get(prefix + ":" + localName);
    + Function f = (Function) _functions.get(prefix + ":" + localName);
    return f.getMethod();
    }
    +
    return null;
    }

    public void addFunction(String prefix, String localName, Method m)
    {
    - if (this.functions == null)
    + if (_functions == null)
    {
    - this.functions = new HashMap();
    + _functions = new HashMap<String, Function>();
    }
    +
    Function f = new Function(prefix, localName, m);
    synchronized (this)
    {
    - this.functions.put(prefix + ":" + localName, f);
    + _functions.put(prefix + ":" + localName, f);
    }
    }

    @@ -82,7 +82,7 @@
    */
    public void writeExternal(ObjectOutput out) throws IOException
    {
    - out.writeObject(this.functions);
    + out.writeObject(_functions);
    }

    /*
    @@ -90,39 +90,41 @@
    *
    * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
    */
    + @SuppressWarnings("unchecked")
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {
    - this.functions = (Map) in.readObject();
    + _functions = (Map<String, Function>) in.readObject();
    }

    + @Override
    public String toString()
    {
    StringBuffer sb = new StringBuffer(128);
    sb.append("FunctionMapper[\n");
    - for (Iterator itr = this.functions.values().iterator(); itr.hasNext();)
    + for (Function function : _functions.values())
    {
    - sb.append(itr.next()).append('\n');
    + sb.append(function).append('\n');
    }
    sb.append(']');
    +
    return sb.toString();
    }

    private static class Function implements Externalizable
    {
    -
    private static final long serialVersionUID = 1L;

    - protected transient Method m;
    + protected transient Method _m;

    - protected String owner;
    + protected String _owner;

    - protected String name;
    + protected String _name;

    - protected String[] types;
    + protected String[] _types;

    - protected String prefix;
    + protected String _prefix;

    - protected String localName;
    + protected String _localName;

    /**
    *
    @@ -137,9 +139,10 @@
    {
    throw new NullPointerException("Method cannot be null");
    }
    - this.prefix = prefix;
    - this.localName = localName;
    - this.m = m;
    +
    + _prefix = prefix;
    + _localName = localName;
    + _m = m;
    }

    public Function()
    @@ -154,11 +157,11 @@
    */
    public void writeExternal(ObjectOutput out) throws IOException
    {
    - out.writeUTF((this.prefix != null) ? this.prefix : "");
    - out.writeUTF(this.localName);
    - out.writeUTF(this.m.getDeclaringClass().getName());
    - out.writeUTF(this.m.getName());
    - out.writeObject(ReflectionUtil.toTypeNameArray(this.m.getParameterTypes()));
    + out.writeUTF(_prefix != null ? _prefix : "");
    + out.writeUTF(_localName);
    + out.writeUTF(_m.getDeclaringClass().getName());
    + out.writeUTF(_m.getName());
    + out.writeObject(ReflectionUtil.toTypeNameArray(this._m.getParameterTypes()));
    }

    /*
    @@ -168,44 +171,46 @@
    */
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {
    -
    - this.prefix = in.readUTF();
    - if ("".equals(this.prefix))
    - this.prefix = null;
    - this.localName = in.readUTF();
    - this.owner = in.readUTF();
    - this.name = in.readUTF();
    - this.types = (String[]) in.readObject();
    + _prefix = in.readUTF();
    + if ("".equals(_prefix))
    + _prefix = null;
    +
    + _localName = in.readUTF();
    + _owner = in.readUTF();
    + _name = in.readUTF();
    + _types = (String[]) in.readObject();
    }

    public Method getMethod()
    {
    - if (this.m == null)
    + if (_m == null)
    {
    try
    {
    - Class t = ReflectionUtil.forName(this.owner);
    - Class[] p = ReflectionUtil.toTypeArray(this.types);
    - this.m = t.getMethod(this.name, p);
    + Class<?> t = ReflectionUtil.forName(_owner);
    + Class<?>[] p = ReflectionUtil.toTypeArray(_types);
    + _m = t.getMethod(_name, p);
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    }
    - return this.m;
    +
    + return _m;
    }

    public boolean matches(String prefix, String localName)
    {
    - if (this.prefix != null)
    + if (_prefix != null)
    {
    if (prefix == null)
    return false;
    - if (!this.prefix.equals(prefix))
    + if (!_prefix.equals(prefix))
    return false;
    }
    - return this.localName.equals(localName);
    +
    + return _localName.equals(localName);
    }

    /*
    @@ -213,12 +218,14 @@
    *
    * @see java.lang.Object#equals(java.lang.Object)
    */
    + @Override
    public boolean equals(Object obj)
    {
    if (obj instanceof Function)
    {
    - return this.hashCode() == obj.hashCode();
    + return hashCode() == obj.hashCode();
    }
    +
    return false;
    }

    @@ -227,21 +234,24 @@
    *
    * @see java.lang.Object#hashCode()
    */
    + @Override
    public int hashCode()
    {
    - return (this.prefix + this.localName).hashCode();
    + return (_prefix + _localName).hashCode();
    }

    + @Override
    public String toString()
    {
    StringBuffer sb = new StringBuffer(32);
    sb.append("Function[");
    - if (this.prefix != null)
    + if (_prefix != null)
    {
    - sb.append(this.prefix).append(':');
    + sb.append(_prefix).append(':');
    }
    - sb.append(this.name).append("] ");
    - sb.append(this.m);
    + sb.append(_name).append("] ");
    + sb.append(_m);
    +
    return sb.toString();
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultVariableMapper.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultVariableMapper.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultVariableMapper.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultVariableMapper.java Thu Feb 12 01:23:54 2009
    @@ -36,8 +36,7 @@
    */
    public final class DefaultVariableMapper extends VariableMapper
    {
    -
    - private Map vars;
    + private Map<String, ValueExpression> _vars;

    public DefaultVariableMapper()
    {
    @@ -49,10 +48,11 @@
    */
    public ValueExpression resolveVariable(String name)
    {
    - if (this.vars != null)
    + if (_vars != null)
    {
    - return (ValueExpression) this.vars.get(name);
    + return _vars.get(name);
    }
    +
    return null;
    }

    @@ -61,11 +61,11 @@
    */
    public ValueExpression setVariable(String name, ValueExpression expression)
    {
    - if (this.vars == null)
    + if (_vars == null)
    {
    - this.vars = new HashMap();
    + _vars = new HashMap<String, ValueExpression>();
    }
    - return (ValueExpression) this.vars.put(name, expression);
    +
    + return _vars.put(name, expression);
    }
    -
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/ELText.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/ELText.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/ELText.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/ELText.java Thu Feb 12 01:23:54 2009
    @@ -19,7 +19,6 @@
    package com.sun.facelets.el;

    import java.io.IOException;
    -import java.io.StringWriter;
    import java.io.Writer;
    import java.util.ArrayList;
    import java.util.List;
    @@ -30,8 +29,6 @@
    import javax.el.ValueExpression;
    import javax.faces.context.ResponseWriter;

    -import com.sun.facelets.util.FastWriter;
    -
    /**
    * Handles parsing EL Strings in accordance with the EL-API Specification. The parser accepts either <code>${..}</code>
    * or <code>#{..}</code>.
    @@ -91,12 +88,12 @@
    return null;
    }

    - public Class getType(ELContext context)
    + public Class<?> getType(ELContext context)
    {
    return null;
    }

    - public Class getExpectedType()
    + public Class<?> getExpectedType()
    {
    return null;
    }
    @@ -342,7 +339,7 @@
    int vlen = 0;

    StringBuffer buff = new StringBuffer(128);
    - List text = new ArrayList();
    + List<ELText> text = new ArrayList<ELText>();
    ELText t = null;
    ValueExpression ve = null;


    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/TagValueExpression.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/TagValueExpression.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/TagValueExpression.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/TagValueExpression.java Thu Feb 12 01:23:54 2009
    @@ -57,12 +57,12 @@
    this.orig = orig;
    }

    - public Class getExpectedType()
    + public Class<?> getExpectedType()
    {
    return this.orig.getExpectedType();
    }

    - public Class getType(ELContext context)
    + public Class<?> getType(ELContext context)
    {
    try
    {

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java Thu Feb 12 01:23:54 2009
    @@ -36,9 +36,9 @@
    public final class VariableMapperWrapper extends VariableMapper
    {

    - private final VariableMapper target;
    + private final VariableMapper _target;

    - private Map vars;
    + private Map<String, ValueExpression> _vars;

    /**
    *
    @@ -46,7 +46,7 @@
    public VariableMapperWrapper(VariableMapper orig)
    {
    super();
    - this.target = orig;
    + _target = orig;
    }

    /**
    @@ -59,14 +59,16 @@
    ValueExpression ve = null;
    try
    {
    - if (this.vars != null)
    + if (_vars != null)
    {
    - ve = (ValueExpression) this.vars.get(variable);
    + ve = (ValueExpression) _vars.get(variable);
    }
    +
    if (ve == null)
    {
    - return this.target.resolveVariable(variable);
    + return _target.resolveVariable(variable);
    }
    +
    return ve;
    }
    catch (StackOverflowError e)
    @@ -82,10 +84,11 @@
    */
    public ValueExpression setVariable(String variable, ValueExpression expression)
    {
    - if (this.vars == null)
    + if (_vars == null)
    {
    - this.vars = new HashMap();
    + _vars = new HashMap<String, ValueExpression>();
    }
    - return (ValueExpression) this.vars.put(variable, expression);
    +
    + return _vars.put(variable, expression);
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFacelet.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFacelet.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFacelet.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFacelet.java Thu Feb 12 01:23:54 2009
    @@ -39,11 +39,11 @@
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    -
    -import com.sun.facelets.Facelet;
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    +import com.sun.facelets.Facelet;
    import com.sun.facelets.tag.jsf.ComponentSupport;

    /**
    @@ -59,33 +59,33 @@

    private final static String APPLIED_KEY = "com.sun.facelets.APPLIED";

    - private final String alias;
    + private final String _alias;

    - private final ExpressionFactory elFactory;
    + private final ExpressionFactory _elFactory;

    - private final DefaultFaceletFactory factory;
    + private final DefaultFaceletFactory _factory;

    - private final long createTime;
    + private final long _createTime;

    - private final long refreshPeriod;
    + private final long _refreshPeriod;

    - private final Map relativePaths;
    + private final Map<String, URL> _relativePaths;

    - private final FaceletHandler root;
    + private final FaceletHandler _root;

    - private final URL src;
    + private final URL _src;

    public DefaultFacelet(DefaultFaceletFactory factory, ExpressionFactory el, URL src, String alias,
    FaceletHandler root)
    {
    - this.factory = factory;
    - this.elFactory = el;
    - this.src = src;
    - this.root = root;
    - this.alias = alias;
    - this.createTime = System.currentTimeMillis();
    - this.refreshPeriod = this.factory.getRefreshPeriod();
    - this.relativePaths = new WeakHashMap();
    + _factory = factory;
    + _elFactory = el;
    + _src = src;
    + _root = root;
    + _alias = alias;
    + _createTime = System.currentTimeMillis();
    + _refreshPeriod = _factory.getRefreshPeriod();
    + _relativePaths = new WeakHashMap<String, URL>();
    }

    /**
    @@ -97,14 +97,14 @@
    DefaultFaceletContext ctx = new DefaultFaceletContext(facesContext, this);
    this.refresh(parent);
    ComponentSupport.markForDeletion(parent);
    - this.root.apply(ctx, parent);
    + _root.apply(ctx, parent);
    ComponentSupport.finalizeForDeletion(parent);
    this.markApplied(parent);
    }

    private final void refresh(UIComponent c)
    {
    - if (this.refreshPeriod > 0)
    + if (_refreshPeriod > 0)
    {

    // finally remove any children marked as deleted
    @@ -112,22 +112,22 @@
    if (sz > 0)
    {
    UIComponent cc = null;
    - List cl = c.getChildren();
    + List<UIComponent> cl = c.getChildren();
    ApplyToken token;
    while (--sz >= 0)
    {
    - cc = (UIComponent) cl.get(sz);
    + cc = cl.get(sz);
    if (!cc.isTransient())
    {
    token = (ApplyToken) cc.getAttributes().get(APPLIED_KEY);
    - if (token != null && token.time < this.createTime && token.alias.equals(this.alias))
    + if (token != null && token._time < _createTime && token._alias.equals(_alias))
    {
    if (log.isLoggable(Level.INFO))
    {
    DateFormat df = SimpleDateFormat.getTimeInstance();
    - log.info("Facelet[" + this.alias + "] was modified @ "
    - + df.format(new Date(this.createTime)) + ", flushing component applied @ "
    - + df.format(new Date(token.time)));
    + log.info("Facelet[" + _alias + "] was modified @ "
    + + df.format(new Date(_createTime)) + ", flushing component applied @ "
    + + df.format(new Date(token._time)));
    }
    cl.remove(sz);
    }
    @@ -138,23 +138,23 @@
    // remove any facets marked as deleted
    if (c.getFacets().size() > 0)
    {
    - Collection col = c.getFacets().values();
    + Collection<UIComponent> col = c.getFacets().values();
    UIComponent fc;
    ApplyToken token;
    - for (Iterator itr = col.iterator(); itr.hasNext();)
    + for (Iterator<UIComponent> itr = col.iterator(); itr.hasNext();)
    {
    - fc = (UIComponent) itr.next();
    + fc = itr.next();
    if (!fc.isTransient())
    {
    token = (ApplyToken) fc.getAttributes().get(APPLIED_KEY);
    - if (token != null && token.time < this.createTime && token.alias.equals(this.alias))
    + if (token != null && token._time < _createTime && token._alias.equals(_alias))
    {
    if (log.isLoggable(Level.INFO))
    {
    DateFormat df = SimpleDateFormat.getTimeInstance();
    - log.info("Facelet[" + this.alias + "] was modified @ "
    - + df.format(new Date(this.createTime)) + ", flushing component applied @ "
    - + df.format(new Date(token.time)));
    + log.info("Facelet[" + _alias + "] was modified @ "
    + + df.format(new Date(_createTime)) + ", flushing component applied @ "
    + + df.format(new Date(token._time)));
    }
    itr.remove();
    }
    @@ -166,18 +166,16 @@

    private final void markApplied(UIComponent parent)
    {
    - if (this.refreshPeriod > 0)
    + if (this._refreshPeriod > 0)
    {
    - Iterator itr = parent.getFacetsAndChildren();
    - UIComponent c;
    - Map attr;
    - ApplyToken token = new ApplyToken(this.alias, System.currentTimeMillis() + this.refreshPeriod);
    + Iterator<UIComponent> itr = parent.getFacetsAndChildren();
    + ApplyToken token = new ApplyToken(_alias, System.currentTimeMillis() + _refreshPeriod);
    while (itr.hasNext())
    {
    - c = (UIComponent) itr.next();
    + UIComponent c = itr.next();
    if (!c.isTransient())
    {
    - attr = c.getAttributes();
    + Map<String, Object> attr = c.getAttributes();
    if (!attr.containsKey(APPLIED_KEY))
    {
    attr.put(APPLIED_KEY, token);
    @@ -194,7 +192,7 @@
    */
    public String getAlias()
    {
    - return this.alias;
    + return _alias;
    }

    /**
    @@ -204,7 +202,7 @@
    */
    public ExpressionFactory getExpressionFactory()
    {
    - return this.elFactory;
    + return _elFactory;
    }

    /**
    @@ -214,7 +212,7 @@
    */
    public long getCreateTime()
    {
    - return this.createTime;
    + return _createTime;
    }

    /**
    @@ -228,11 +226,11 @@
    */
    private URL getRelativePath(String path) throws IOException
    {
    - URL url = (URL) this.relativePaths.get(path);
    + URL url = (URL) _relativePaths.get(path);
    if (url == null)
    {
    - url = this.factory.resolveURL(this.src, path);
    - this.relativePaths.put(path, url);
    + url = _factory.resolveURL(_src, path);
    + _relativePaths.put(path, url);
    }
    return url;
    }
    @@ -244,7 +242,7 @@
    */
    public URL getSource()
    {
    - return this.src;
    + return _src;
    }

    /**
    @@ -264,7 +262,7 @@
    FaceletException, ELException
    {
    this.refresh(parent);
    - this.root.apply(new DefaultFaceletContext(ctx, this), parent);
    + _root.apply(new DefaultFaceletContext(ctx, this), parent);
    this.markApplied(parent);
    }

    @@ -310,15 +308,15 @@
    public void include(DefaultFaceletContext ctx, UIComponent parent, URL url) throws IOException, FacesException,
    FaceletException, ELException
    {
    - DefaultFacelet f = (DefaultFacelet) this.factory.getFacelet(url);
    + DefaultFacelet f = (DefaultFacelet) _factory.getFacelet(url);
    f.include(ctx, parent);
    }

    private static class ApplyToken implements Externalizable
    {
    - public String alias;
    + public String _alias;

    - public long time;
    + public long _time;

    public ApplyToken()
    {
    @@ -326,25 +324,25 @@

    public ApplyToken(String alias, long time)
    {
    - this.alias = alias;
    - this.time = time;
    + _alias = alias;
    + _time = time;
    }

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {
    - this.alias = in.readUTF();
    - this.time = in.readLong();
    + _alias = in.readUTF();
    + _time = in.readLong();
    }

    public void writeExternal(ObjectOutput out) throws IOException
    {
    - out.writeUTF(this.alias);
    - out.writeLong(this.time);
    + out.writeUTF(_alias);
    + out.writeLong(_time);
    }
    }

    public String toString()
    {
    - return this.alias;
    + return _alias;
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java Thu Feb 12 01:23:54 2009
    @@ -18,19 +18,26 @@
    */
    package com.sun.facelets.impl;

    -import javax.faces.webapp.pdl.facelets.FaceletContext;
    -import javax.faces.webapp.pdl.facelets.FaceletException;
    -import com.sun.facelets.TemplateClient;
    -import com.sun.facelets.el.DefaultVariableMapper;
    -import com.sun.facelets.el.ELAdaptor;
    -
    -import javax.el.*;
    +import java.io.IOException;
    +import java.net.URL;
    +import java.util.ArrayList;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +import javax.el.ELContext;
    +import javax.el.ELException;
    +import javax.el.ELResolver;
    +import javax.el.ExpressionFactory;
    +import javax.el.FunctionMapper;
    +import javax.el.ValueExpression;
    +import javax.el.VariableMapper;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    -import java.io.IOException;
    -import java.net.URL;
    -import java.util.*;
    +import javax.faces.webapp.pdl.facelets.FaceletContext;
    +
    +import com.sun.facelets.el.DefaultVariableMapper;

    /**
    * Default FaceletContext implementation.
    @@ -45,52 +52,53 @@
    final class DefaultFaceletContext extends FaceletContext
    {

    - private final FacesContext faces;
    + private final FacesContext _faces;

    - private final ELContext ctx;
    + private final ELContext _ctx;

    - private final DefaultFacelet facelet;
    - private final List faceletHierarchy;
    + private final DefaultFacelet _facelet;
    + private final List<DefaultFacelet> _faceletHierarchy;

    - private VariableMapper varMapper;
    + private VariableMapper _varMapper;

    - private FunctionMapper fnMapper;
    + private FunctionMapper _fnMapper;

    - private final Map ids;
    - private final Map prefixes;
    - private String prefix;
    + private final Map<String, Integer> _ids;
    + private final Map<Integer, Integer> _prefixes;
    + private String _prefix;
    +
    // TODO: change to StringBuilder when JDK1.5 support is available in Facelets
    - private final StringBuffer uniqueIdBuilder = new StringBuffer(30);
    + private final StringBuffer _uniqueIdBuilder = new StringBuffer(30);

    public DefaultFaceletContext(DefaultFaceletContext ctx, DefaultFacelet facelet)
    {
    - this.ctx = ctx.ctx;
    - this.faces = ctx.faces;
    - this.fnMapper = ctx.fnMapper;
    - this.ids = ctx.ids;
    - this.prefixes = ctx.prefixes;
    - this.varMapper = ctx.varMapper;
    - this.faceletHierarchy = new ArrayList(ctx.faceletHierarchy.size() + 1);
    - this.faceletHierarchy.addAll(ctx.faceletHierarchy);
    - this.faceletHierarchy.add(facelet);
    - this.facelet = facelet;
    + _ctx = ctx._ctx;
    + _faces = ctx._faces;
    + _fnMapper = ctx._fnMapper;
    + _ids = ctx._ids;
    + _prefixes = ctx._prefixes;
    + _varMapper = ctx._varMapper;
    + _faceletHierarchy = new ArrayList<DefaultFacelet>(ctx._faceletHierarchy.size() + 1);
    + _faceletHierarchy.addAll(ctx._faceletHierarchy);
    + _faceletHierarchy.add(facelet);
    + _facelet = facelet;
    }

    public DefaultFaceletContext(FacesContext faces, DefaultFacelet facelet)
    {
    - this.ctx = ELAdaptor.getELContext(faces);
    - this.ids = new HashMap();
    - this.prefixes = new HashMap();
    - this.faces = faces;
    - this.faceletHierarchy = new ArrayList(1);
    - this.faceletHierarchy.add(facelet);
    - this.facelet = facelet;
    - this.varMapper = this.ctx.getVariableMapper();
    - if (this.varMapper == null)
    + _ctx = faces.getELContext();
    + _ids = new HashMap<String, Integer>();
    + _prefixes = new HashMap<Integer, Integer>();
    + _faces = faces;
    + _faceletHierarchy = new ArrayList<DefaultFacelet>(1);
    + _faceletHierarchy.add(facelet);
    + _facelet = facelet;
    + _varMapper = _ctx.getVariableMapper();
    + if (_varMapper == null)
    {
    - this.varMapper = new DefaultVariableMapper();
    + _varMapper = new DefaultVariableMapper();
    }
    - this.fnMapper = this.ctx.getFunctionMapper();
    + _fnMapper = _ctx.getFunctionMapper();
    }

    /*
    @@ -101,7 +109,7 @@
    @Override
    public FacesContext getFacesContext()
    {
    - return this.faces;
    + return _faces;
    }

    /*
    @@ -112,7 +120,7 @@
    @Override
    public ExpressionFactory getExpressionFactory()
    {
    - return this.facelet.getExpressionFactory();
    + return _facelet.getExpressionFactory();
    }

    /*
    @@ -124,7 +132,7 @@
    public void setVariableMapper(VariableMapper varMapper)
    {
    // Assert.param("varMapper", varMapper);
    - this.varMapper = varMapper;
    + _varMapper = varMapper;
    }

    /*
    @@ -136,7 +144,7 @@
    public void setFunctionMapper(FunctionMapper fnMapper)
    {
    // Assert.param("fnMapper", fnMapper);
    - this.fnMapper = fnMapper;
    + _fnMapper = fnMapper;
    }

    /*
    @@ -147,7 +155,7 @@
    @Override
    public void includeFacelet(UIComponent parent, String relativePath) throws IOException
    {
    - this.facelet.include(this, parent, relativePath);
    + _facelet.include(this, parent, relativePath);
    }

    /*
    @@ -158,7 +166,7 @@
    @Override
    public FunctionMapper getFunctionMapper()
    {
    - return this.fnMapper;
    + return _fnMapper;
    }

    /*
    @@ -169,7 +177,7 @@
    @Override
    public VariableMapper getVariableMapper()
    {
    - return this.varMapper;
    + return _varMapper;
    }

    /*
    @@ -179,7 +187,7 @@
    */
    public Object getContext(Class key)
    {
    - return this.ctx.getContext(key);
    + return _ctx.getContext(key);
    }

    /*
    @@ -189,7 +197,7 @@
    */
    public void putContext(Class key, Object contextObject)
    {
    - this.ctx.putContext(key, contextObject);
    + _ctx.putContext(key, contextObject);
    }

    /*
    @@ -201,52 +209,52 @@
    public String generateUniqueId(String base)
    {

    - if (prefix == null)
    + if (_prefix == null)
    {
    // TODO: change to StringBuilder when JDK1.5 support is available
    - StringBuffer builder = new StringBuffer(faceletHierarchy.size() * 30);
    - for (int i = 0; i < faceletHierarchy.size(); i++)
    + StringBuffer builder = new StringBuffer(_faceletHierarchy.size() * 30);
    + for (int i = 0; i < _faceletHierarchy.size(); i++)
    {
    - DefaultFacelet facelet = (DefaultFacelet) faceletHierarchy.get(i);
    + DefaultFacelet facelet = _faceletHierarchy.get(i);
    builder.append(facelet.getAlias());
    }
    Integer prefixInt = new Integer(builder.toString().hashCode());

    - Integer cnt = (Integer) prefixes.get(prefixInt);
    + Integer cnt = _prefixes.get(prefixInt);
    if (cnt == null)
    {
    - this.prefixes.put(prefixInt, new Integer(0));
    - prefix = prefixInt.toString();
    + _prefixes.put(prefixInt, new Integer(0));
    + _prefix = prefixInt.toString();
    }
    else
    {
    int i = cnt.intValue() + 1;
    - this.prefixes.put(prefixInt, new Integer(i));
    - prefix = prefixInt + "_" + i;
    + _prefixes.put(prefixInt, new Integer(i));
    + _prefix = prefixInt + "_" + i;
    }
    }

    - Integer cnt = (Integer) this.ids.get(base);
    + Integer cnt = _ids.get(base);
    if (cnt == null)
    {
    - this.ids.put(base, new Integer(0));
    - uniqueIdBuilder.delete(0, uniqueIdBuilder.length());
    - uniqueIdBuilder.append(prefix);
    - uniqueIdBuilder.append("_");
    - uniqueIdBuilder.append(base);
    - return uniqueIdBuilder.toString();
    + _ids.put(base, new Integer(0));
    + _uniqueIdBuilder.delete(0, _uniqueIdBuilder.length());
    + _uniqueIdBuilder.append(_prefix);
    + _uniqueIdBuilder.append("_");
    + _uniqueIdBuilder.append(base);
    + return _uniqueIdBuilder.toString();
    }
    else
    {
    int i = cnt.intValue() + 1;
    - this.ids.put(base, new Integer(i));
    - uniqueIdBuilder.delete(0, uniqueIdBuilder.length());
    - uniqueIdBuilder.append(prefix);
    - uniqueIdBuilder.append("_");
    - uniqueIdBuilder.append(base);
    - uniqueIdBuilder.append("_");
    - uniqueIdBuilder.append(i);
    - return uniqueIdBuilder.toString();
    + _ids.put(base, new Integer(i));
    + _uniqueIdBuilder.delete(0, _uniqueIdBuilder.length());
    + _uniqueIdBuilder.append(_prefix);
    + _uniqueIdBuilder.append("_");
    + _uniqueIdBuilder.append(base);
    + _uniqueIdBuilder.append("_");
    + _uniqueIdBuilder.append(i);
    + return _uniqueIdBuilder.toString();
    }
    }

    @@ -258,9 +266,9 @@
    @Override
    public Object getAttribute(String name)
    {
    - if (this.varMapper != null)
    + if (_varMapper != null)
    {
    - ValueExpression ve = this.varMapper.resolveVariable(name);
    + ValueExpression ve = _varMapper.resolveVariable(name);
    if (ve != null)
    {
    return ve.getValue(this);
    @@ -277,16 +285,16 @@
    @Override
    public void setAttribute(String name, Object value)
    {
    - if (this.varMapper != null)
    + if (_varMapper != null)
    {
    if (value == null)
    {
    - this.varMapper.setVariable(name, null);
    + _varMapper.setVariable(name, null);
    }
    else
    {
    - this.varMapper.setVariable(name, this.facelet.getExpressionFactory()
    - .createValueExpression(value, Object.class));
    + _varMapper.setVariable(name,
    + _facelet.getExpressionFactory().createValueExpression(value, Object.class));
    }
    }
    }
    @@ -299,71 +307,24 @@
    @Override
    public void includeFacelet(UIComponent parent, URL absolutePath) throws IOException, FacesException, ELException
    {
    - this.facelet.include(this, parent, absolutePath);
    + _facelet.include(this, parent, absolutePath);
    }

    @Override
    public ELResolver getELResolver()
    {
    - return this.ctx.getELResolver();
    - }
    -
    - private final static class TemplateManager implements TemplateClient
    - {
    - private final DefaultFacelet owner;
    -
    - private final TemplateClient target;
    -
    - private final boolean root;
    -
    - private final Set names = new HashSet();
    -
    - public TemplateManager(DefaultFacelet owner, TemplateClient target, boolean root)
    - {
    - this.owner = owner;
    - this.target = target;
    - this.root = root;
    - }
    -
    - public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException, FacesException,
    - FaceletException, ELException
    - {
    - String testName = (name != null) ? name : "facelets._NULL_DEF_";
    - if (this.names.contains(testName))
    - {
    - return false;
    - }
    - else
    - {
    - this.names.add(testName);
    - boolean found = false;
    - found = this.target.apply(new DefaultFaceletContext((DefaultFaceletContext) ctx, this.owner), parent,
    - name);
    - this.names.remove(testName);
    - return found;
    - }
    - }
    -
    - public boolean equals(Object o)
    - {
    - // System.out.println(this.owner.getAlias() + " == " +
    - // ((DefaultFacelet) o).getAlias());
    - return this.owner == o || this.target == o;
    - }
    -
    - public boolean isRoot()
    - {
    - return this.root;
    - }
    + return _ctx.getELResolver();
    }

    + @Override
    public boolean isPropertyResolved()
    {
    - return this.ctx.isPropertyResolved();
    + return _ctx.isPropertyResolved();
    }

    + @Override
    public void setPropertyResolved(boolean resolved)
    {
    - this.ctx.setPropertyResolved(resolved);
    + _ctx.setPropertyResolved(resolved);
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletFactory.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletFactory.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletFactory.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletFactory.java Thu Feb 12 01:23:54 2009
    @@ -30,15 +30,13 @@

    import javax.el.ELException;
    import javax.faces.FacesException;
    -import javax.faces.context.FacesContext;
    +import javax.faces.webapp.pdl.facelets.FaceletException;
    +import javax.faces.webapp.pdl.facelets.FaceletHandler;

    import com.sun.facelets.Facelet;
    -import javax.faces.webapp.pdl.facelets.FaceletException;
    import com.sun.facelets.FaceletFactory;
    -import javax.faces.webapp.pdl.facelets.FaceletHandler;
    import com.sun.facelets.compiler.Compiler;
    import com.sun.facelets.util.ParameterCheck;
    -import com.sun.facelets.util.Resource;

    /**
    * Default FaceletFactory implementation.
    @@ -48,20 +46,19 @@
    */
    public final class DefaultFaceletFactory extends FaceletFactory
    {
    -
    protected final static Logger log = Logger.getLogger("facelets.factory");

    - private final Compiler compiler;
    + private final Compiler _compiler;

    - private Map facelets;
    + private Map<String, DefaultFacelet> _facelets;

    - private Map relativeLocations;
    + private Map<String, URL> _relativeLocations;

    - private final ResourceResolver resolver;
    + private final ResourceResolver _resolver;

    - private final URL baseUrl;
    + private final URL _baseUrl;

    - private final long refreshPeriod;
    + private final long _refreshPeriod;

    public DefaultFaceletFactory(Compiler compiler, ResourceResolver resolver) throws IOException
    {
    @@ -72,15 +69,15 @@
    {
    ParameterCheck.notNull("compiler", compiler);
    ParameterCheck.notNull("resolver", resolver);
    - this.compiler = compiler;
    - this.facelets = new HashMap();
    - this.relativeLocations = new HashMap();
    - this.resolver = resolver;
    - this.baseUrl = resolver.resolveUrl("/");
    + _compiler = compiler;
    + _facelets = new HashMap<String, DefaultFacelet>();
    + _relativeLocations = new HashMap<String, URL>();
    + _resolver = resolver;
    + _baseUrl = resolver.resolveUrl("/");
    // this.location = url;
    log.fine("Using ResourceResolver: " + resolver);
    - this.refreshPeriod = (refreshPeriod >= 0) ? refreshPeriod * 1000 : -1;
    - log.fine("Using Refresh Period: " + this.refreshPeriod);
    + _refreshPeriod = (refreshPeriod >= 0) ? refreshPeriod * 1000 : -1;
    + log.fine("Using Refresh Period: " + _refreshPeriod);
    }

    /*
    @@ -90,15 +87,15 @@
    */
    public Facelet getFacelet(String uri) throws IOException, FaceletException, FacesException, ELException
    {
    - URL url = (URL) this.relativeLocations.get(uri);
    + URL url = (URL) _relativeLocations.get(uri);
    if (url == null)
    {
    - url = this.resolveURL(this.baseUrl, uri);
    + url = this.resolveURL(_baseUrl, uri);
    if (url != null)
    {
    - Map newLoc = new HashMap(this.relativeLocations);
    + Map<String, URL> newLoc = new HashMap<String, URL>(_relativeLocations);
    newLoc.put(uri, url);
    - this.relativeLocations = newLoc;
    + _relativeLocations = newLoc;
    }
    else
    {
    @@ -125,7 +122,7 @@
    {
    if (path.startsWith("/"))
    {
    - URL url = this.resolver.resolveUrl(path);
    + URL url = _resolver.resolveUrl(path);
    if (url == null)
    {
    throw new FileNotFoundException(path + " Not Found in ExternalContext as a Resource");
    @@ -154,15 +151,15 @@
    {
    ParameterCheck.notNull("url", url);
    String key = url.toString();
    - DefaultFacelet f = (DefaultFacelet) this.facelets.get(key);
    + DefaultFacelet f = _facelets.get(key);
    if (f == null || this.needsToBeRefreshed(f))
    {
    f = this.createFacelet(url);
    - if (this.refreshPeriod != 0)
    + if (_refreshPeriod != 0)
    {
    - Map newLoc = new HashMap(this.facelets);
    + Map<String, DefaultFacelet> newLoc = new HashMap<String, DefaultFacelet>(_facelets);
    newLoc.put(key, f);
    - this.facelets = newLoc;
    + _facelets = newLoc;
    }
    }
    return f;
    @@ -178,12 +175,12 @@
    protected boolean needsToBeRefreshed(DefaultFacelet facelet)
    {
    // if set to 0, constantly reload-- nocache
    - if (this.refreshPeriod == 0)
    + if (_refreshPeriod == 0)
    return true;
    // if set to -1, never reload
    - if (this.refreshPeriod == -1)
    + if (_refreshPeriod == -1)
    return false;
    - long ttl = facelet.getCreateTime() + this.refreshPeriod;
    + long ttl = facelet.getCreateTime() + _refreshPeriod;
    URL url = facelet.getSource();
    InputStream is = null;
    if (System.currentTimeMillis() > ttl)
    @@ -234,11 +231,11 @@
    {
    log.fine("Creating Facelet for: " + url);
    }
    - String alias = "/" + url.getFile().replaceFirst(this.baseUrl.getFile(), "");
    + String alias = "/" + url.getFile().replaceFirst(_baseUrl.getFile(), "");
    try
    {
    - FaceletHandler h = this.compiler.compile(url, alias);
    - DefaultFacelet f = new DefaultFacelet(this, this.compiler.createExpressionFactory(), url, alias, h);
    + FaceletHandler h = _compiler.compile(url, alias);
    + DefaultFacelet f = new DefaultFacelet(this, _compiler.createExpressionFactory(), url, alias, h);
    return f;
    }
    catch (FileNotFoundException fnfe)
    @@ -254,11 +251,11 @@
    */
    public Compiler getCompiler()
    {
    - return this.compiler;
    + return _compiler;
    }

    public long getRefreshPeriod()
    {
    - return refreshPeriod;
    + return _refreshPeriod;
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/AbstractTagLibrary.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/AbstractTagLibrary.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/AbstractTagLibrary.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/AbstractTagLibrary.java Thu Feb 12 01:23:54 2009
    @@ -27,12 +27,9 @@

    import javax.el.ELException;
    import javax.faces.FacesException;
    -import javax.faces.convert.Converter;
    -import javax.faces.validator.Validator;
    -
    -import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;
    +
    import com.sun.facelets.tag.jsf.ComponentConfig;
    import com.sun.facelets.tag.jsf.ComponentHandler;
    import com.sun.facelets.tag.jsf.ConvertHandler;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/CompositeFaceletHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/CompositeFaceletHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/CompositeFaceletHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/CompositeFaceletHandler.java Thu Feb 12 01:23:54 2009
    @@ -23,7 +23,6 @@
    import javax.el.ELException;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    import javax.faces.webapp.pdl.facelets.FaceletHandler;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaRulesetImpl.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaRulesetImpl.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaRulesetImpl.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaRulesetImpl.java Thu Feb 12 01:23:54 2009
    @@ -29,6 +29,7 @@
    import java.util.logging.Logger;

    import javax.faces.webapp.pdl.facelets.FaceletContext;
    +
    import com.sun.facelets.util.ParameterCheck;

    /**

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaTagHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaTagHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaTagHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MetaTagHandler.java Thu Feb 12 01:23:54 2009
    @@ -19,6 +19,7 @@
    package com.sun.facelets.tag;

    import javax.faces.webapp.pdl.facelets.FaceletContext;
    +
    import com.sun.facelets.util.ParameterCheck;

    /**
    @@ -29,10 +30,9 @@
    */
    public abstract class MetaTagHandler extends TagHandler
    {
    + private Class<?> _lastType = Object.class;

    - private Class lastType = Object.class;
    -
    - private Metadata mapper;
    + private Metadata _mapper;

    public MetaTagHandler(TagConfig config)
    {
    @@ -45,7 +45,7 @@
    * @param type
    * @return
    */
    - protected MetaRuleset createMetaRuleset(Class type)
    + protected MetaRuleset createMetaRuleset(Class<?> type)
    {
    ParameterCheck.notNull("type", type);
    return new MetaRulesetImpl(this.tag, type);
    @@ -62,13 +62,14 @@
    {
    if (instance != null)
    {
    - Class type = instance.getClass();
    - if (mapper == null || !this.lastType.equals(type))
    + Class<?> type = instance.getClass();
    + if (_mapper == null || !_lastType.equals(type))
    {
    - this.lastType = type;
    - this.mapper = this.createMetaRuleset(type).finish();
    + _lastType = type;
    + _mapper = this.createMetaRuleset(type).finish();
    }
    - this.mapper.applyMetadata(ctx, instance);
    +
    + _mapper.applyMetadata(ctx, instance);
    }
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MethodRule.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MethodRule.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MethodRule.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/MethodRule.java Thu Feb 12 01:23:54 2009
    @@ -22,10 +22,7 @@
    import java.lang.reflect.Method;

    import javax.el.MethodExpression;
    -import javax.faces.el.MethodBinding;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    -import com.sun.facelets.el.LegacyMethodBinding;

    /**
    * Optional Rule for binding Method[Binding|Expression] properties
    @@ -38,11 +35,11 @@

    private final String methodName;

    - private final Class returnTypeClass;
    + private final Class<?> returnTypeClass;

    - private final Class[] params;
    + private final Class<?>[] params;

    - public MethodRule(String methodName, Class returnTypeClass, Class[] params)
    + public MethodRule(String methodName, Class<?> returnTypeClass, Class<?>[] params)
    {
    this.methodName = methodName;
    this.returnTypeClass = returnTypeClass;
    @@ -54,15 +51,7 @@
    if (false == name.equals(this.methodName))
    return null;

    - if (MethodBinding.class.equals(meta.getPropertyType(name)))
    - {
    - Method method = meta.getWriteMethod(name);
    - if (method != null)
    - {
    - return new MethodBindingMetadata(method, attribute, this.returnTypeClass, this.params);
    - }
    - }
    - else if (MethodExpression.class.equals(meta.getPropertyType(name)))
    + if (MethodExpression.class.equals(meta.getPropertyType(name)))
    {
    Method method = meta.getWriteMethod(name);
    if (method != null)
    @@ -74,54 +63,18 @@
    return null;
    }

    - private class MethodBindingMetadata extends Metadata
    - {
    - private final Method _method;
    -
    - private final TagAttribute _attribute;
    -
    - private Class[] _paramList;
    -
    - private Class _returnType;
    -
    - public MethodBindingMetadata(Method method, TagAttribute attribute, Class returnType, Class[] paramList)
    - {
    - _method = method;
    - _attribute = attribute;
    - _paramList = paramList;
    - _returnType = returnType;
    - }
    -
    - public void applyMetadata(FaceletContext ctx, Object instance)
    - {
    - MethodExpression expr = _attribute.getMethodExpression(ctx, _returnType, _paramList);
    -
    - try
    - {
    - _method.invoke(instance, new Object[] { new LegacyMethodBinding(expr) });
    - }
    - catch (InvocationTargetException e)
    - {
    - throw new TagAttributeException(_attribute, e.getCause());
    - }
    - catch (Exception e)
    - {
    - throw new TagAttributeException(_attribute, e);
    - }
    - }
    - }
    -
    private class MethodExpressionMetadata extends Metadata
    {
    private final Method _method;

    private final TagAttribute _attribute;

    - private Class[] _paramList;
    + private Class<?>[] _paramList;

    - private Class _returnType;
    + private Class<?> _returnType;

    - public MethodExpressionMetadata(Method method, TagAttribute attribute, Class returnType, Class[] paramList)
    + public MethodExpressionMetadata(Method method, TagAttribute attribute, Class<?> returnType,
    + Class<?>[] paramList)
    {
    _method = method;
    _attribute = attribute;

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagAttribute.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagAttribute.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagAttribute.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagAttribute.java Thu Feb 12 01:23:54 2009
    @@ -22,8 +22,8 @@
    import javax.el.ExpressionFactory;
    import javax.el.MethodExpression;
    import javax.el.ValueExpression;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    +
    import com.sun.facelets.el.ELText;
    import com.sun.facelets.el.TagMethodExpression;
    import com.sun.facelets.el.TagValueExpression;
    @@ -146,7 +146,7 @@
    * parameter type
    * @return a MethodExpression instance
    */
    - public MethodExpression getMethodExpression(FaceletContext ctx, Class type, Class[] paramTypes)
    + public MethodExpression getMethodExpression(FaceletContext ctx, Class<?> type, Class<?>[] paramTypes)
    {
    try
    {
    @@ -235,7 +235,7 @@
    * expected return type
    * @return Object value of this attribute
    */
    - public Object getObject(FaceletContext ctx, Class type)
    + public Object getObject(FaceletContext ctx, Class<?> type)
    {
    if (this.literal)
    {
    @@ -280,7 +280,7 @@
    * expected return type
    * @return ValueExpression instance
    */
    - public ValueExpression getValueExpression(FaceletContext ctx, Class type)
    + public ValueExpression getValueExpression(FaceletContext ctx, Class<?> type)
    {
    try
    {

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/TagHandler.java Thu Feb 12 01:23:54 2009
    @@ -85,12 +85,13 @@
    * Class type to search for
    * @return iterator over instances of FaceletHandlers of the matching type
    */
    - protected final Iterator findNextByType(Class type)
    + @SuppressWarnings("unchecked")
    + protected final <T> Iterator<T> findNextByType(Class<T> type)
    {
    - List found = new ArrayList();
    + List<T> found = new ArrayList<T>();
    if (type.isAssignableFrom(this.nextHandler.getClass()))
    {
    - found.add(this.nextHandler);
    + found.add((T)this.nextHandler);
    }
    else if (this.nextHandler instanceof CompositeFaceletHandler)
    {
    @@ -99,7 +100,7 @@
    {
    if (type.isAssignableFrom(h[i].getClass()))
    {
    - found.add(h[i]);
    + found.add((T)h[i]);
    }
    }
    }

    Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/UserTagHandler.java
    URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/UserTagHandler.java?rev=743585&r1=743584&r2=743585&view=diff
    ==============================================================================
    --- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/UserTagHandler.java (original)
    +++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/UserTagHandler.java Thu Feb 12 01:23:54 2009
    @@ -21,17 +21,17 @@
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.net.URL;
    -import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    +import java.util.Map;

    import javax.el.ELException;
    import javax.el.VariableMapper;
    import javax.faces.FacesException;
    import javax.faces.component.UIComponent;
    -
    import javax.faces.webapp.pdl.facelets.FaceletContext;
    import javax.faces.webapp.pdl.facelets.FaceletException;
    +
    import com.sun.facelets.TemplateClient;
    import com.sun.facelets.el.VariableMapperWrapper;
    import com.sun.facelets.tag.ui.DefineHandler;

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedFeb 12, '09 at 1:24a
activeFeb 12, '09 at 1:24a
posts3
users1
websitemyfaces.apache.org

1 user in discussion

Slessard: 3 posts

People

Translate

site design / logo © 2019 Grokbase