You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/09/20 21:46:33 UTC
svn commit: r448315 -
/myfaces/core/trunk/api/src/main/java/javax/faces/webapp/AttributeTag.java
Author: mmarinschek
Date: Wed Sep 20 12:46:32 2006
New Revision: 448315
URL: http://svn.apache.org/viewvc?view=rev&rev=448315
Log:
fix for [MYFACES-437] <f:attribute> does not work with <x:dataTable>. Thanks to Michal Borowiecki.
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/webapp/AttributeTag.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/webapp/AttributeTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/webapp/AttributeTag.java?view=diff&rev=448315&r1=448314&r2=448315
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/webapp/AttributeTag.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/webapp/AttributeTag.java Wed Sep 20 12:46:32 2006
@@ -60,10 +60,16 @@
String name = getName();
if (component.getAttributes().get(name) == null)
{
- Object value = getValue();
-
- if(value != null)
- component.getAttributes().put(name, value);
+ if (UIComponentTag.isValueReference(_value))
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ValueBinding vb = facesContext.getApplication().createValueBinding(_value);
+ component.setValueBinding(name, vb);
+ }
+ else
+ {
+ if(_value != null) component.getAttributes().put(name, _value);
+ }
}
return Tag.SKIP_BODY;
}
@@ -87,20 +93,6 @@
else
{
return _name;
- }
- }
-
- private Object getValue()
- {
- if (UIComponentTag.isValueReference(_value))
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- ValueBinding vb = facesContext.getApplication().createValueBinding(_value);
- return vb.getValue(facesContext);
- }
- else
- {
- return _value;
}
}