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 2005/08/03 14:19:54 UTC
svn commit: r227206 -
/myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java
Author: mmarinschek
Date: Wed Aug 3 05:19:50 2005
New Revision: 227206
URL: http://svn.apache.org/viewcvs?rev=227206&view=rev
Log:
thanks again to Udo Schnurpfeil for his suggestion on _ComponentAttributesMap.get
Modified:
myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java
Modified: myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java?rev=227206&r1=227205&r2=227206&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/component/_ComponentAttributesMap.java Wed Aug 3 05:19:50 2005
@@ -121,30 +121,23 @@
public Object get(Object key)
{
checkKey(key);
- PropertyDescriptor propertyDescriptor = getPropertyDescriptor((String)key);
+ PropertyDescriptor propertyDescriptor
+ = getPropertyDescriptor((String)key);
if (propertyDescriptor != null)
{
- Object value = getComponentProperty(propertyDescriptor);
- if (value != null)
- {
- return value;
- }
-
- ValueBinding vb = _component.getValueBinding((String) key);
- return vb != null ? vb.getValue(FacesContext.getCurrentInstance()) : null;
+ return getComponentProperty(propertyDescriptor);
}
- else
+ Object mapValue = _attributes.get(key);
+ if (mapValue != null)
{
- Object mapValue = _attributes.get(key);
-
- if (mapValue != null)
- {
- return mapValue;
- }
-
- ValueBinding vb = _component.getValueBinding((String) key);
- return vb != null ? vb.getValue(FacesContext.getCurrentInstance()) : null;
+ return mapValue;
}
+ ValueBinding vb = _component.getValueBinding((String) key);
+ if (vb != null)
+ {
+ return vb.getValue(FacesContext.getCurrentInstance());
+ }
+ return null;
}
public Object remove(Object key)