Author: nbelaevski
Date: 2010-11-03 18:19:35 -0400 (Wed, 03 Nov 2010)
New Revision: 19918
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java
Log:
https://jira.jboss.org/browse/RF-9632
Modified: trunk/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
===================================================================
---
trunk/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2010-11-03
19:52:47 UTC (rev 19917)
+++
trunk/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2010-11-03
22:19:35 UTC (rev 19918)
@@ -152,6 +152,19 @@
return components;
}
+ public ComponentModel getComponentByRenderer(FacesId family, FacesId rendererType) {
+ if (family == null) {
+ return null;
+ }
+
+ for (ComponentModel component : components) {
+ if (family.equals(component.getFamily()) &&
rendererType.equals(component.getRendererType())) {
+ return component;
+ }
+ }
+ return null;
+ }
+
public ComponentModel getComponentByFamily(FacesId family) {
if (family == null) {
return null;
@@ -161,6 +174,7 @@
if (family.equals(component.getFamily())) {
return component;
}
+
}
return null;
}
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java
===================================================================
---
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java 2010-11-03
19:52:47 UTC (rev 19917)
+++
trunk/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java 2010-11-03
22:19:35 UTC (rev 19918)
@@ -78,7 +78,7 @@
}
private ComponentModel findComponentByRenderer(RendererModel renderer,
ComponentLibrary library) {
- return library.getComponentByFamily(renderer.getFamily());
+ return library.getComponentByRenderer(renderer.getFamily(), renderer.getId());
}
/*