Author: Alex.Kolonitsky
Date: 2010-05-11 09:04:45 -0400 (Tue, 11 May 2010)
New Revision: 16984
Removed:
root/ui/core/trunk/api/src/main/config/faces-config.xml
root/ui/core/trunk/api/src/main/resources/META-INF/a4j.taglib.xml
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java
root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java
Log:
fix core-ui generation
1) push tag handler
2) absence render class in faces-config.xml
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java 2010-05-11
13:04:39 UTC (rev 16983)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RendererAdapter.java 2010-05-11
13:04:45 UTC (rev 16984)
@@ -23,8 +23,10 @@
package org.richfaces.cdk.xmlconfig.model;
+import org.richfaces.cdk.model.ClassName;
import org.richfaces.cdk.model.RendererModel;
import org.richfaces.cdk.model.RendererModel.Type;
+import org.richfaces.cdk.util.Strings;
/**
* <p class="changed_added_4_0">
@@ -46,8 +48,17 @@
@Override
protected void postMarshal(RendererModel model, RendererBean bean) {
+ ClassName baseClass = model.getBaseClass();
+ ClassName rendererClass = model.getRendererClass();
+ if (!model.isGenerate() && !isEmpty(baseClass) &&
isEmpty(rendererClass)) {
+ bean.setRendererClass(baseClass);
+ }
}
+ private static boolean isEmpty(ClassName className) {
+ return className == null || Strings.isEmpty(className.getName());
+ }
+
@Override
protected void postUnmarshal(RendererBean bean, RendererModel model) {
// Copy type.
Deleted: root/ui/core/trunk/api/src/main/config/faces-config.xml
===================================================================
--- root/ui/core/trunk/api/src/main/config/faces-config.xml 2010-05-11 13:04:39 UTC (rev
16983)
+++ root/ui/core/trunk/api/src/main/config/faces-config.xml 2010-05-11 13:04:45 UTC (rev
16984)
@@ -1,104 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
- version="2.0">
-
- <component>
- <component-type>org.richfaces.Function</component-type>
- <component-class>org.richfaces.component.html.HtmlAjaxFunction</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.Status</component-type>
- <component-class>org.richfaces.component.html.HtmlAjaxStatus</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.Queue</component-type>
- <component-class>org.richfaces.component.html.HtmlQueue</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.CommandLink</component-type>
- <component-class>org.richfaces.component.html.HtmlCommandLink</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.CommandButton</component-type>
- <component-class>org.richfaces.component.html.HtmlCommandButton</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.MediaOutput</component-type>
- <component-class>org.richfaces.component.html.HtmlMediaOutput</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.Push</component-type>
- <component-class>org.richfaces.component.html.HtmlPush</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.OutputPanel</component-type>
- <component-class>org.richfaces.component.html.HtmlOutputPanel</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
-
- <component>
- <component-type>org.richfaces.AjaxLog</component-type>
- <component-class>org.richfaces.component.html.HtmlAjaxLog</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions"
>true</cdk:generate>
- </component-extension>
- </component>
-
- <render-kit>
- <render-kit-id>HTML_BASIC</render-kit-id>
- <renderer>
- <component-family>org.richfaces.Push</component-family>
- <renderer-type>org.richfaces.PushRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.html.AjaxPushRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>org.richfaces.MediaOutput</component-family>
- <renderer-type>org.richfaces.MediaOutputRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.html.MediaOutputRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>javax.faces.Panel</component-family>
- <renderer-type>org.richfaces.OutputPanelRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.html.AjaxOutputPanelRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>org.richfaces.Status</component-family>
- <renderer-type>org.richfaces.StatusRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.html.AjaxStatusRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>org.richfaces.Queue</component-family>
- <renderer-type>org.richfaces.QueueRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.html.QueueRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>javax.faces.Data</component-family>
- <renderer-type>org.richfaces.RepeatRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.html.RepeatRenderer</renderer-class>
- </renderer>
- </render-kit>
-</faces-config>
\ No newline at end of file
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java
===================================================================
---
root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java 2010-05-11
13:04:39 UTC (rev 16983)
+++
root/ui/core/trunk/api/src/main/java/org/richfaces/component/AbstractPush.java 2010-05-11
13:04:45 UTC (rev 16984)
@@ -39,6 +39,7 @@
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Signature;
import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
/**
* Component for periodically call AJAX events on server ( poll actions )
@@ -46,7 +47,7 @@
*
*/
@JsfComponent(
- tag = @Tag(generate = true, handler =
"org.richfaces.view.facelets.html.AjaxPushHandler")
+ tag = @Tag(generate = true, handler =
"org.richfaces.view.facelets.html.AjaxPushHandler", type = TagType.Facelets)
)
public abstract class AbstractPush extends UICommand {
Deleted: root/ui/core/trunk/api/src/main/resources/META-INF/a4j.taglib.xml
===================================================================
--- root/ui/core/trunk/api/src/main/resources/META-INF/a4j.taglib.xml 2010-05-11 13:04:39
UTC (rev 16983)
+++ root/ui/core/trunk/api/src/main/resources/META-INF/a4j.taglib.xml 2010-05-11 13:04:45
UTC (rev 16984)
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<facelet-taglib
xmlns="http://java.sun.com/xml/ns/javaee"
version="2.0" id="a4j">
- <
namespace>http://richfaces.org/a4j</namespace>
- <tag>
- <tag-name>jsFunction</tag-name>
- <component>
- <component-type>org.richfaces.Function</component-type>
- <renderer-type>org.richfaces.FunctionRenderer</renderer-type>
- </component>
-
- </tag>
- <tag>
- <tag-name>status</tag-name>
- <component>
- <component-type>org.richfaces.Status</component-type>
- <renderer-type>org.richfaces.StatusRenderer</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>queue</tag-name>
- <component>
- <component-type>org.richfaces.Queue</component-type>
- <renderer-type>org.richfaces.QueueRenderer</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>commandLink</tag-name>
- <component>
- <component-type>org.richfaces.CommandLink</component-type>
- <renderer-type>org.richfaces.CommandLinkRenderer</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>commandButton</tag-name>
- <component>
- <component-type>org.richfaces.CommandButton</component-type>
- <renderer-type>org.richfaces.CommandButtonRenderer</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>repeat</tag-name>
- <component>
- <component-type>org.richfaces.Repeat</component-type>
- <renderer-type>org.richfaces.RepeatRenderer</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>mediaOutput</tag-name>
- <component>
- <component-type>org.richfaces.MediaOutput</component-type>
- <renderer-type>org.richfaces.MediaOutputRenderer</renderer-type>
- <handler-class>org.richfaces.view.facelets.html.MediaOutputHandler</handler-class>
- </component>
-
- </tag>
- <tag>
- <tag-name>log</tag-name>
- <component>
- <component-type>org.richfaces.AjaxLog</component-type>
- <renderer-type>org.richfaces.AjaxLogRenderer</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>push</tag-name>
- <component>
- <component-type>org.richfaces.Push</component-type>
- <renderer-type>org.richfaces.PushRenderer</renderer-type>
- <handler-class>org.richfaces.view.facelets.html.AjaxPushHandler</handler-class>
- </component>
- </tag>
- <tag>
- <tag-name>outputPanel</tag-name>
- <component>
- <component-type>org.richfaces.OutputPanel</component-type>
- <renderer-type>org.richfaces.OutputPanelRenderer</renderer-type>
- </component>
- </tag>
- <tag>
- <tag-name>region</tag-name>
- <component>
- <component-type>org.richfaces.Region</component-type>
- </component>
- </tag>
- <tag>
- <tag-name>ajax</tag-name>
- <behavior>
- <behavior-id>org.ajax4jsf.behavior.Ajax</behavior-id>
- <handler-class>org.richfaces.view.facelets.html.AjaxHandler</handler-class>
- </behavior>
- </tag>
- <tag>
- <tag-name>attachQueue</tag-name>
- <component>
- <component-type>org.richfaces.AttachQueue</component-type>
-
<handler-class>org.richfaces.view.facelets.html.AttachQueueHandler</handler-class>
- </component>
- </tag>
-</facelet-taglib>