Author: alexsmirnov
Date: 2011-01-11 19:11:56 -0500 (Tue, 11 Jan 2011)
New Revision: 20957
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/LibraryModelWrapper.java
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java
Log:
RESOLVED - issue RF-9847: @JsfBehaviorRenderer annotation ignored
https://issues.jboss.org/browse/RF-9847
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/LibraryModelWrapper.java
===================================================================
---
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/LibraryModelWrapper.java 2011-01-11
23:45:11 UTC (rev 20956)
+++
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/LibraryModelWrapper.java 2011-01-12
00:11:56 UTC (rev 20957)
@@ -26,9 +26,9 @@
import org.richfaces.cdk.model.ClassName;
import org.richfaces.cdk.model.EventModel;
import org.richfaces.cdk.model.FacesId;
+import org.richfaces.cdk.model.ModelElementBase;
import org.richfaces.cdk.model.PropertyBase;
import org.richfaces.cdk.model.TagModel;
-import org.richfaces.cdk.model.ViewElement;
import freemarker.ext.beans.BeansWrapper;
import freemarker.ext.beans.StringModel;
@@ -72,7 +72,7 @@
return create(obj, EventTemplateModel.FACTORY);
} else if (obj instanceof TagModel) {
return create(obj, TagTemplateModel.FACTORY);
- } else if (obj instanceof ViewElement) {
+ } else if (obj instanceof ModelElementBase ) {
return create(obj, ModelElementBaseTemplateModel.FACTORY);
} else {
return super.wrap(obj);
Modified:
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java
===================================================================
---
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java 2011-01-11
23:45:11 UTC (rev 20956)
+++
trunk/cdk/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java 2011-01-12
00:11:56 UTC (rev 20957)
@@ -180,13 +180,13 @@
public TemplateModel getImplementedInterfaces() throws TemplateModelException {
Set<ClassName> result = Sets.newTreeSet();
- if (getEventNames().size() > 0) {
-
result.add(ClassName.parseName("javax.faces.component.behavior.ClientBehaviorHolder"));
- }
// Import all interfaces implemented by the generated class.
result.addAll(model.getInterfaces());
if (model instanceof ComponentModel) {
ComponentModel component = (ComponentModel) model;
+ if (getEventNames().size() > 0) {
+
result.add(ClassName.parseName("javax.faces.component.behavior.ClientBehaviorHolder"));
+ }
for (EventModel event : component.getEvents()) {
ClassName sourceInterface = event.getSourceInterface();
if (null != sourceInterface) {