Author: ppitonak(a)redhat.com
Date: 2010-11-23 12:02:21 -0500 (Tue, 23 Nov 2010)
New Revision: 20151
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
Log:
* attributes modified to reduce parsing XML and log output
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-11-23
15:12:38 UTC (rev 20150)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attribute.java 2010-11-23
17:02:21 UTC (rev 20151)
@@ -59,6 +59,15 @@
this.name = name;
}
+ public Attribute(Attribute attr) {
+ this.name = attr.name;
+ this.value = null;
+ this.type = attr.type;
+ this.help = attr.help;
+ this.selectOptions = attr.selectOptions;
+ this.extensions = attr.extensions;
+ }
+
public Object getValue() {
return value;
}
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-11-23
15:12:38 UTC (rev 20150)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-11-23
17:02:21 UTC (rev 20151)
@@ -71,7 +71,7 @@
private static final long serialVersionUID = -1L;
private static Logger logger = LoggerFactory.getLogger(Attributes.class);
- private Map<Class<?>, List<Attribute>> richfacesAttributes;
+ private static Map<Class<?>, List<Attribute>> richfacesAttributes;
// K - name of a component attribute, V - value of the component attribute
private Map<String, Attribute> attributes;
// class object of managed bean
@@ -100,7 +100,8 @@
attributes = new TreeMap<String, Attribute>();
}
for (Attribute a : richfacesAttributes.get(componentClass)) {
- attributes.put(a.getName(), a);
+ Attribute newAttr = new Attribute(a);
+ attributes.put(newAttr.getName(), newAttr);
}
} else {
logger.debug("retrieving attributes of " + componentClass.getName()
+ " from class descriptor");
Show replies by date