Author: gvanmatre
Date: Thu Nov 9 11:26:41 2006
New Revision: 473039
URL: http://svn.apache.org/viewvc?view=rev&rev=473039
Log:
It is not correct to assume that all components will extend UIComponentBase.
The Trinidad components extend UIComponent (SHALE-326).
Modified:
shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValueCommand.java
Modified:
shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValueCommand.java
URL:
http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValueCommand.java?view=diff&rev=473039&r1=473038&r2=473039
==============================================================================
---
shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValueCommand.java
(original)
+++
shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/PropertyValueCommand.java
Thu Nov 9 11:26:41 2006
@@ -22,7 +22,7 @@
import java.util.Map;
-import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.el.PropertyNotFoundException;
@@ -140,7 +140,7 @@
// don't try to set the binding attribute of anything but a component
if (attributeBean.getName().equals("binding")
- && !(child instanceof UIComponentBase)) {
+ && !(child instanceof UIComponent)) {
return isFinal;
}
@@ -167,20 +167,20 @@
boolean isEL = isValueReference(expr);
//use value binding
boolean isVB = ((bindingType.equals(AttributeBean.BINDING_TYPE_VALUE))
- && (child instanceof UIComponentBase));
+ && (child instanceof UIComponent));
//use early binding
boolean isEarly = bindingType.equals(AttributeBean.BINDING_TYPE_EARLY);
if (isEL && isVB) {
- getTagUtils().setValueBinding((UIComponentBase) child,
attributeBean.getName(), expr);
+ getTagUtils().setValueBinding((UIComponent) child,
attributeBean.getName(), expr);
} else if (isEL && isEarly) {
ValueBinding vb =
facesContext.getApplication().createValueBinding(expr);
Object value = vb.getValue(facesContext);
try {
setProperty(facesContext, child, attributeBean.getName(),
value);
} catch (Exception e) {
- if (child instanceof UIComponentBase) {
- ((UIComponentBase)
child).getAttributes().put(attributeBean.getName(), expr);
+ if (child instanceof UIComponent) {
+ ((UIComponent)
child).getAttributes().put(attributeBean.getName(), expr);
} else {
throw e;
}
@@ -189,8 +189,8 @@
try {
setProperty(facesContext, child, attributeBean.getName(), expr);
} catch (Exception e) {
- if (child instanceof UIComponentBase) {
- ((UIComponentBase)
child).getAttributes().put(attributeBean.getName(), expr);
+ if (child instanceof UIComponent) {
+ ((UIComponent)
child).getAttributes().put(attributeBean.getName(), expr);
} else {
if
(child.getClass().getName().equals("org.apache.shale.validator.CommonsValidator"))
{
Map vars = (Map) propertyHelper.getValue(child, "vars");