Author: nbelaevski
Date: 2010-12-13 18:54:02 -0500 (Mon, 13 Dec 2010)
New Revision: 20544
Added:
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/ajax-props.xml
Modified:
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/command-button-props.xml
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/link-props.xml
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxFunction.java
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandButton.java
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandLink.java
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java
trunk/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java
Log:
https://issues.jboss.org/browse/RF-9878
Added: trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/ajax-props.xml
===================================================================
--- trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/ajax-props.xml
(rev 0)
+++
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/ajax-props.xml 2010-12-13
23:54:02 UTC (rev 20544)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright ${year}, Red Hat,
+ Inc. and individual contributors by the @authors tag. See the copyright.txt
+ in the distribution for a full listing of individual contributors. This is
+ free software; you can redistribute it and/or modify it under the terms of
+ the GNU Lesser General Public License as published by the Free Software Foundation;
+ either version 2.1 of the License, or (at your option) any later version.
+ This software is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ details. You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the
+ FSF site:
http://www.fsf.org. -->
+<cdk:properties
xmlns:xi="http://www.w3.org/2001/XInclude"
+
xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee">
+
+ <property>
+ <property-name>execute</property-name>
+ <property-class>java.lang.Object</property-class>
+ </property>
+ <property>
+ <property-name>render</property-name>
+ <property-class>java.lang.Object</property-class>
+ </property>
+ <property>
+ <property-name>limitRender</property-name>
+ <property-class>boolean</property-class>
+ <default-value>false</default-value>
+ </property>
+
+ <property>
+ <property-name>onbegin</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:event-name default="false">begin</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>onbeforedomupdate</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:event-name
default="false">beforedomupdate</cdk:event-name>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>oncomplete</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:event-name
default="false">complete</cdk:event-name>
+ </property-extension>
+ </property>
+
+ <property>
+ <property-name>status</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>data</property-name>
+ <property-class>java.lang.Object</property-class>
+ </property>
+
+</cdk:properties>
Modified:
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/command-button-props.xml
===================================================================
---
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/command-button-props.xml 2010-12-13
19:32:01 UTC (rev 20543)
+++
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/command-button-props.xml 2010-12-13
23:54:02 UTC (rev 20544)
@@ -31,7 +31,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>false</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>click</cdk:event-name>
<cdk:event-name>action</cdk:event-name>
<default-behavior>true</default-behavior>
</property-extension>
@@ -48,27 +48,12 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>dblclick</cdk:event-name>
</property-extension>
</property>
<property>
<description>
- Javascript code executed when this element loses focus
- and its value has been modified since gaining focus.
- </description>
- <display-name>Input Change Script</display-name>
- <icon />
- <property-name>onchange</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
- </property-extension>
- </property>
-
- <property>
- <description>
Javascript code executed when a pointer button is
pressed down over this element.
</description>
@@ -78,7 +63,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mousedown</cdk:event-name>
</property-extension>
</property>
@@ -93,7 +78,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mouseup</cdk:event-name>
</property-extension>
</property>
@@ -108,7 +93,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mouseover</cdk:event-name>
</property-extension>
</property>
@@ -123,7 +108,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mousemove</cdk:event-name>
</property-extension>
</property>
@@ -138,7 +123,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mouseout</cdk:event-name>
</property-extension>
</property>
@@ -153,7 +138,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>keypress</cdk:event-name>
</property-extension>
</property>
@@ -168,7 +153,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>keydown</cdk:event-name>
</property-extension>
</property>
@@ -183,7 +168,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>keyup</cdk:event-name>
</property-extension>
</property>
Modified: trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/link-props.xml
===================================================================
---
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/link-props.xml 2010-12-13
19:32:01 UTC (rev 20543)
+++
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/link-props.xml 2010-12-13
23:54:02 UTC (rev 20544)
@@ -164,7 +164,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>false</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>click</cdk:event-name>
<cdk:event-name>action</cdk:event-name>
<default-behavior>true</default-behavior>
</property-extension>
@@ -181,7 +181,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>dblclick</cdk:event-name>
</property-extension>
</property>
@@ -196,7 +196,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mousedown</cdk:event-name>
</property-extension>
</property>
@@ -211,7 +211,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mouseup</cdk:event-name>
</property-extension>
</property>
@@ -226,7 +226,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mouseover</cdk:event-name>
</property-extension>
</property>
@@ -241,7 +241,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mousemove</cdk:event-name>
</property-extension>
</property>
@@ -256,7 +256,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>mouseout</cdk:event-name>
</property-extension>
</property>
@@ -271,7 +271,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>keypress</cdk:event-name>
</property-extension>
</property>
@@ -286,7 +286,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>keydown</cdk:event-name>
</property-extension>
</property>
@@ -301,7 +301,7 @@
<property-class>java.lang.String</property-class>
<property-extension>
<cdk:pass-through>true</cdk:pass-through>
- <cdk:event-name />
+ <cdk:event-name>keyup</cdk:event-name>
</property-extension>
</property>
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxFunction.java
===================================================================
---
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxFunction.java 2010-12-13
19:32:01 UTC (rev 20543)
+++
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxFunction.java 2010-12-13
23:54:02 UTC (rev 20544)
@@ -24,7 +24,6 @@
package org.richfaces.component;
import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
@@ -37,7 +36,8 @@
*/
@JsfComponent(
renderer = @JsfRenderer(type = "org.richfaces.FunctionRenderer"),
- tag = @Tag(name = "jsFunction", type = TagType.Facelets)
+ tag = @Tag(name = "jsFunction", type = TagType.Facelets),
+ attributes = {"ajax-props.xml"}
)
public abstract class AbstractAjaxFunction extends AbstractActionComponent {
@@ -45,27 +45,7 @@
public static final String COMPONENT_TYPE = "org.richfaces.Function";
- @Attribute
- public abstract boolean isLimitRender();
-
@Attribute(required = true)
public abstract String getName();
- @Attribute
- public abstract Object getExecute();
-
- @Attribute
- public abstract Object getRender();
-
- @Attribute
- public abstract String getStatus();
-
- @Attribute(events = @EventName("begin"))
- public abstract String getOnbegin();
-
- @Attribute(events = @EventName("beforedomupdate"))
- public abstract String getOnbeforedomupdate();
-
- @Attribute(events = @EventName("complete"))
- public abstract String getOncomplete();
}
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandButton.java
===================================================================
---
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandButton.java 2010-12-13
19:32:01 UTC (rev 20543)
+++
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandButton.java 2010-12-13
23:54:02 UTC (rev 20544)
@@ -19,16 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
package org.richfaces.component;
import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
@@ -37,65 +33,29 @@
/**
* @author Nick Belaevski
- *
+ *
*/
-@JsfComponent(renderer = @JsfRenderer(type =
"org.richfaces.CommandButtonRenderer"), tag = @Tag(type = TagType.Facelets))
+@JsfComponent(renderer = @JsfRenderer(type =
"org.richfaces.CommandButtonRenderer"),
+ tag = @Tag(type = TagType.Facelets),
+ attributes = { "ajax-props.xml", "command-button-props.xml",
"core-props.xml" }
+)
public abstract class AbstractCommandButton extends AbstractActionComponent implements
MetaComponentResolver {
public static final String COMPONENT_TYPE = "org.richfaces.CommandButton";
public static final String COMPONENT_FAMILY = UICommand.COMPONENT_FAMILY;
-
- @Attribute(events = {@EventName("click"), @EventName(value =
"action", defaultEvent = true)})
- public abstract String getOnclick();
- @Attribute(events = @EventName("mousemove"))
- public abstract String getOnmousemove();
-
- @Attribute(events = @EventName("dblclick"))
- public abstract String getOndblclick();
-
- @Attribute(events = @EventName("keydown"))
- public abstract String getOnkeydown();
-
- @Attribute(events = @EventName("keypress"))
- public abstract String getOnkeypress();
-
- @Attribute(events = @EventName("keyup"))
- public abstract String getOnkeyup();
-
- @Attribute(events = @EventName("mousedown"))
- public abstract String getOnmousedown();
-
- @Attribute(events = @EventName("mouseout"))
- public abstract String getOnmouseout();
-
- @Attribute(events = @EventName("mouseover"))
- public abstract String getOnmouseover();
-
- @Attribute(events = @EventName("mouseup"))
- public abstract String getOnmouseup();
-
- @Attribute(defaultValue = "")
- public abstract String getStyle();
-
- @Attribute(defaultValue = "")
- public abstract String getStyleClass();
-
- @Attribute
- public abstract boolean isLimitRender();
-
public String resolveClientId(FacesContext facesContext, UIComponent
contextComponent, String metaComponentId) {
return null;
}
-
+
public String substituteUnresolvedClientId(FacesContext facesContext, UIComponent
contextComponent,
String metaComponentId) {
-
+
if (AjaxContainer.META_COMPONENT_ID.equals(metaComponentId)) {
return AjaxConstants.FORM;
}
-
+
return null;
}
}
Modified: trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandLink.java
===================================================================
---
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandLink.java 2010-12-13
19:32:01 UTC (rev 20543)
+++
trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractCommandLink.java 2010-12-13
23:54:02 UTC (rev 20544)
@@ -27,7 +27,6 @@
import javax.faces.context.FacesContext;
import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
@@ -39,7 +38,8 @@
*/
@JsfComponent (
renderer = @JsfRenderer(type = "org.richfaces.CommandLinkRenderer"),
- tag = @Tag(type = TagType.Facelets)
+ tag = @Tag(type = TagType.Facelets),
+ attributes = { "ajax-props.xml", "link-props.xml",
"core-props.xml" }
)
public abstract class AbstractCommandLink extends AbstractActionComponent implements
MetaComponentResolver {
@@ -47,45 +47,9 @@
public static final String COMPONENT_FAMILY = UICommand.COMPONENT_FAMILY;
- @Attribute(events = {@EventName("click"), @EventName(value =
"action", defaultEvent = true)})
- public abstract String getOnclick();
-
- @Attribute(events = @EventName("mousemove"))
- public abstract String getOnmousemove();
-
- @Attribute(events = @EventName("dblclick"))
- public abstract String getOndblclick();
-
- @Attribute(events = @EventName("keydown"))
- public abstract String getOnkeydown();
-
- @Attribute(events = @EventName("keypress"))
- public abstract String getOnkeypress();
-
- @Attribute(events = @EventName("keyup"))
- public abstract String getOnkeyup();
-
- @Attribute(events = @EventName("mousedown"))
- public abstract String getOnmousedown();
-
- @Attribute(events = @EventName("mouseout"))
- public abstract String getOnmouseout();
-
- @Attribute(events = @EventName("mouseover"))
- public abstract String getOnmouseover();
-
- @Attribute(events = @EventName("mouseup"))
- public abstract String getOnmouseup();
-
- @Attribute(defaultValue = "")
- public abstract String getStyle();
-
- @Attribute(defaultValue = "")
- public abstract String getStyleClass();
-
- @Attribute
- public abstract boolean isLimitRender();
-
+ @Attribute(hidden = true)
+ private String target;
+
public String resolveClientId(FacesContext facesContext, UIComponent
contextComponent, String metaComponentId) {
return null;
}
Modified: trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java
===================================================================
--- trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java 2010-12-13
19:32:01 UTC (rev 20543)
+++ trunk/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java 2010-12-13
23:54:02 UTC (rev 20544)
@@ -37,7 +37,8 @@
*/
@JsfComponent(
tag = @Tag(generate = false, handler =
"org.richfaces.view.facelets.html.AjaxPollHandler", type = TagType.Facelets),
- renderer = @JsfRenderer(type = "org.richfaces.PollRenderer")
+ renderer = @JsfRenderer(type = "org.richfaces.PollRenderer"),
+ attributes = { "ajax-props.xml" }
)
public abstract class AbstractPoll extends AbstractActionComponent {
public static final String COMPONENT_TYPE = "org.richfaces.Poll";
@@ -66,15 +67,6 @@
@Attribute(defaultValue = "true")
public abstract boolean isEnabled();
- @Attribute(events = @EventName("begin"))
- public abstract String getOnbegin();
-
- @Attribute(events = @EventName("beforedomupdate"))
- public abstract String getOnbeforedomupdate();
-
- @Attribute(events = @EventName("complete"))
- public abstract String getOncomplete();
-
@Attribute(events = @EventName(value = TIMER, defaultEvent = true))
public abstract String getOntimer();
Modified:
trunk/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml
===================================================================
---
trunk/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml 2010-12-13
19:32:01 UTC (rev 20543)
+++
trunk/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml 2010-12-13
23:54:02 UTC (rev 20544)
@@ -23,7 +23,7 @@
</a>
</c:when>
<c:otherwise>
- <span id="#{clientId}"
cdk:passThroughWithExclusions="value">
+ <span id="#{clientId}" cdk:passThrough="dir lang class style
title">
#{component.attributes['value']}
<cdk:call expression="renderChildren(facesContext, component)" />
</span>
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java 2010-12-13
19:32:01 UTC (rev 20543)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractMenuItem.java 2010-12-13
23:54:02 UTC (rev 20544)
@@ -11,7 +11,7 @@
type = AbstractMenuItem.COMPONENT_TYPE,
renderer=@JsfRenderer(type = MenuItemRendererBase.RENDERER_TYPE),
tag = @Tag(name="menuItem"),
- attributes = {"events-props.xml", "core-props.xml",
"i18n-props.xml"})
+ attributes = {"events-props.xml", "core-props.xml",
"i18n-props.xml", "ajax-props.xml"})
public abstract class AbstractMenuItem extends AbstractActionComponent
implements MenuComponent {
@@ -31,12 +31,6 @@
@Attribute
public abstract boolean isDisabled();
-
- @Attribute
- public abstract String getStyleClass();
-
- @Attribute
- public abstract String getStyle();
public enum Facets {
ICON("icon"), ICON_DISABLED("iconDisabled");