Author: konstantin.mishin
Date: 2009-08-21 14:45:20 -0400 (Fri, 21 Aug 2009)
New Revision: 15268
Added:
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java
root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml
root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxCommandButtonRendererBase.java
root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml
root/ui/trunk/components/core/src/main/resources/META-INF/faces-config.xml
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/button.template.xml
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/function.template.xml
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml
Log:
a4j:commandLink and a4j:commandButton initial integration into 4.0
Added:
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java
===================================================================
---
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java
(rev 0)
+++
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java 2009-08-21
18:45:20 UTC (rev 15268)
@@ -0,0 +1,27 @@
+package org.richfaces.demo;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+@ManagedBean(name="commandBean")
+@SessionScoped
+public class CommandBean {
+
+ private String name;
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void submit() {
+ name = "Hello " + name;
+
+ }
+
+ public void reset() {
+ name = "";
+ }
+}
Added: root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml
===================================================================
--- root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml
(rev 0)
+++ root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml 2009-08-21
18:45:20 UTC (rev 15268)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j">
+<f:view>
+ <h:head>
+ </h:head>
+ <h:body>
+ <h:outputText value="Name:" />
+ <h:form>
+ <h:inputText value="#{commandBean.name}" />
+ <a4j:commandButton action="#{commandBean.submit}"
render="out" value="Say Hello" />
+ <a4j:commandButton action="#{commandBean.reset}"
render="out" value="Reset" />
+ </h:form>
+ <br />
+ <h:panelGroup id="out">
+ <h:outputText value="#{commandBean.name}" />
+ <h:outputText value="!" rendered="#{not empty
commandBean.name}" />
+ </h:panelGroup>
+ </h:body>
+</f:view>
+</html>
\ No newline at end of file
Added: root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml
===================================================================
--- root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml
(rev 0)
+++ root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml 2009-08-21
18:45:20 UTC (rev 15268)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j">
+<f:view>
+ <h:head>
+ </h:head>
+ <h:body>
+ <h:outputText value="Name:" />
+ <h:form>
+ <h:inputText value="#{commandBean.name}" />
+ <a4j:commandLink action="#{commandBean.submit}"
render="out">
+ <h:outputText value="Say Hello" />
+ </a4j:commandLink>
+ <a4j:commandLink action="#{commandBean.reset}"
render="out">
+ <h:outputText value="Reset" />
+ </a4j:commandLink>
+ </h:form>
+ <br />
+ <h:panelGroup id="out">
+ <h:outputText value="#{commandBean.name}" />
+ <h:outputText value="!" rendered="#{not empty
commandBean.name}" />
+ </h:panelGroup>
+ </h:body>
+</f:view>
+</html>
\ No newline at end of file
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java 2009-08-21
18:25:38 UTC (rev 15267)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java 2009-08-21
18:45:20 UTC (rev 15268)
@@ -3,12 +3,11 @@
import javax.el.ELException;
import javax.el.ValueExpression;
import javax.faces.FacesException;
+import javax.faces.component.UICommand;
import javax.faces.context.FacesContext;
-import org.richfaces.component.UIAjaxFunction;
+public class HtmlAjaxFunction extends UICommand {
-public class HtmlAjaxFunction extends UIAjaxFunction {
-
public final static String COMPONENT_FAMILY = "javax.faces.Command";
public final static String COMPONENT_TYPE = "org.richfaces.Function";
Added:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
(rev 0)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java 2009-08-21
18:45:20 UTC (rev 15268)
@@ -0,0 +1,38 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component.html;
+
+import javax.faces.component.UICommand;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+
+public class HtmlCommandButton extends UICommand {
+
+ public final static String COMPONENT_TYPE = "org.richfaces.CommandButton";
+
+ public HtmlCommandButton(){
+ setRendererType("org.richfaces.CommandButtonRenderer");
+ }
+}
Added:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
(rev 0)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java 2009-08-21
18:45:20 UTC (rev 15268)
@@ -0,0 +1,59 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component.html;
+
+import javax.faces.component.UICommand;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+
+
+public class HtmlCommandLink extends UICommand {
+
+ public final static String COMPONENT_TYPE = "org.richfaces.CommandLink";
+
+ private static enum PropertyKeys {
+ style, styleClass
+ }
+
+ public HtmlCommandLink() {
+ setRendererType("org.richfaces.CommandLinkRenderer");
+ }
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style, "");
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass, "");
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java 2009-08-21
18:25:38 UTC (rev 15267)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java 2009-08-21
18:45:20 UTC (rev 15268)
@@ -21,22 +21,16 @@
package org.richfaces.renderkit;
-import java.io.IOException;
-import java.util.LinkedHashSet;
import java.util.Map;
-import java.util.Set;
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
-import javax.faces.component.ValueHolder;
-import javax.faces.component.html.HtmlCommandButton;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
-import org.ajax4jsf.component.AjaxComponent;
-import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.event.AjaxEvent;
-import org.ajax4jsf.renderkit.AjaxComponentRendererBase;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.ajax4jsf.renderkit.RendererBase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -45,84 +39,24 @@
* @version $Revision: 1.1.2.3 $ $Date: 2007/02/12 17:46:53 $
*
*/
-public abstract class AjaxCommandRendererBase extends AjaxComponentRendererBase {
+@ResourceDependencies({
+ @ResourceDependency(library = "javax.faces", name = "jsf.js"),
+ @ResourceDependency(name = "jquery.js"),
+ @ResourceDependency(name = "richfaces.js")
+})
+public abstract class AjaxCommandRendererBase extends RendererBase {
private static final Log _log = LogFactory
.getLog(AjaxCommandRendererBase.class);
protected void doDecode(FacesContext facesContext, UIComponent uiComponent) {
-
- // super.decode must not be called, because value is handled here
if (isSubmitted(facesContext, uiComponent)) {
- ActionEvent event;
- event = new ActionEvent(uiComponent);
- uiComponent.queueEvent(event);
- uiComponent.queueEvent(new AjaxEvent(uiComponent));
- // Check areas for processing
- if (uiComponent instanceof AjaxComponent) {
- AjaxComponent ajaxComponent = (AjaxComponent) uiComponent;
- Set<String> toProcess = AjaxRendererUtils.asSet(ajaxComponent
- .getProcess());
- if (null != toProcess) {
- Set<String> componentIdsToProcess = new LinkedHashSet<String>();
- for (String componentId : toProcess) {
- UIComponent component = getUtils().findComponentFor(uiComponent, componentId);
- if(null != component){
- componentIdsToProcess.add(component.getClientId(facesContext));
- } else {
- componentIdsToProcess.add(componentId);
- }
- }
- AjaxContext.getCurrentInstance(facesContext).setAjaxAreasToProcess(componentIdsToProcess);
- }
- }
+ new ActionEvent(uiComponent).queue();
}
}
- public String getOnClick(FacesContext context, UIComponent component) {
- StringBuffer onClick;
- if (!getUtils().isBooleanAttribute(component, "disabled")) {
- onClick = AjaxRendererUtils.buildOnClick(component, context, true);
- if (!"reset".equals(component.getAttributes().get("type"))) {
- onClick.append(";return false;");
- }
- } else {
- onClick = new StringBuffer("return false;");
- }
- return onClick.toString();
- }
-
- public void encodeChildren(FacesContext context, UIComponent component)
- throws IOException {
- renderChildren(context, component);
- }
-
- public Object getValue(UIComponent uiComponent) {
- if (uiComponent instanceof ValueHolder) {
- return ((ValueHolder) uiComponent).getValue();
- }
- return uiComponent.getAttributes().get("value");
- }
-
- public String getType(UIComponent uiComponent) {
- String type;
- if (uiComponent instanceof HtmlCommandButton) {
- type = ((HtmlCommandButton) uiComponent).getType();
- } else {
- type = (String) uiComponent.getAttributes().get("type");
- }
- if (type == null) {
- type = "button";
- }
- return type;
- }
-
protected boolean isSubmitted(FacesContext facesContext,
UIComponent uiComponent) {
- // Componet accept only ajax requests.
- if (!AjaxContext.getCurrentInstance(facesContext).isAjaxRequest()) {
- return false;
- }
if (getUtils().isBooleanAttribute(uiComponent, "disabled")) {
return false;
}
@@ -136,5 +70,42 @@
}
return submitted;
}
-
+
+ public String getOnClick(FacesContext context, UIComponent component) {
+ StringBuffer onClick = new StringBuffer();
+ if (!getUtils().isBooleanAttribute(component, "disabled")) {
+ onClick.append(AjaxRendererUtils.createBehaviorsChain(context, component,
"onclick"));
+ if (!"reset".equals(component.getAttributes().get("type"))) {
+ onClick.append(";return false;");
+ }
+ } else {
+ onClick.append("return false;");
+ }
+ return onClick.toString();
+ }
+//
+// public void encodeChildren(FacesContext context, UIComponent component)
+// throws IOException {
+// renderChildren(context, component);
+// }
+//
+// public Object getValue(UIComponent uiComponent) {
+// if (uiComponent instanceof ValueHolder) {
+// return ((ValueHolder) uiComponent).getValue();
+// }
+// return uiComponent.getAttributes().get("value");
+// }
+//
+// public String getType(UIComponent uiComponent) {
+// String type;
+// if (uiComponent instanceof HtmlCommandButton) {
+// type = ((HtmlCommandButton) uiComponent).getType();
+// } else {
+// type = (String) uiComponent.getAttributes().get("type");
+// }
+// if (type == null) {
+// type = "button";
+// }
+// return type;
+// }
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-21
18:25:38 UTC (rev 15267)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-21
18:45:20 UTC (rev 15268)
@@ -25,12 +25,9 @@
import java.util.Map;
import javax.faces.FacesException;
-import javax.faces.application.ResourceDependencies;
-import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSFunctionDefinition;
@@ -38,30 +35,15 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxEventOptions;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.richfaces.component.UIAjaxFunction;
/**
* @author shura
*
*/
-@ResourceDependencies({
- @ResourceDependency(library = "javax.faces", name = "jsf.js"),
- @ResourceDependency(name = "jquery.js"),
- @ResourceDependency(name = "richfaces.js")
-})
-public class AjaxFunctionRendererBase extends AjaxCommandRendererBase {
+public abstract class AjaxFunctionRendererBase extends AjaxCommandRendererBase {
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
- */
- protected Class<? extends UIComponent> getComponentClass() {
- return UIAjaxFunction.class;
- }
-
- public String getFunction(FacesContext context, UIAjaxFunction component) {
- String functionName = component.getName();
+ public String getFunction(FacesContext context, UIComponent component) {
+ String functionName = (String)component.getAttributes().get("name");
if (functionName == null) {
throw new FacesException("Value of 'name' attribute of a4j:jsFunction
component is null!");
}
@@ -106,14 +88,4 @@
func.appendScript(script);
return script.toString();
}
-
- @Override
- protected void doDecode(FacesContext facesContext, UIComponent uiComponent) {
- Map<String, String> requestParameterMap =
facesContext.getExternalContext().getRequestParameterMap();
- String clientId = uiComponent.getClientId(facesContext);
-
- if (requestParameterMap.get(clientId) != null) {
- new ActionEvent(uiComponent).queue();
- }
- }
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxCommandButtonRendererBase.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxCommandButtonRendererBase.java 2009-08-21
18:25:38 UTC (rev 15267)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxCommandButtonRendererBase.java 2009-08-21
18:45:20 UTC (rev 15268)
@@ -28,7 +28,6 @@
import javax.faces.context.ResponseWriter;
import org.richfaces.renderkit.AjaxCommandRendererBase;
-import org.richfaces.renderkit.CommandRendererBase;
/**
* @author Nick Belaevski
Modified: root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml
===================================================================
--- root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml 2009-08-21
18:25:38 UTC (rev 15267)
+++ root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml 2009-08-21
18:45:20 UTC (rev 15268)
@@ -47,6 +47,20 @@
<renderer-type>org.richfaces.AjaxLogRenderer</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>ajax</tag-name>
Modified: root/ui/trunk/components/core/src/main/resources/META-INF/faces-config.xml
===================================================================
--- root/ui/trunk/components/core/src/main/resources/META-INF/faces-config.xml 2009-08-21
18:25:38 UTC (rev 15267)
+++ root/ui/trunk/components/core/src/main/resources/META-INF/faces-config.xml 2009-08-21
18:45:20 UTC (rev 15268)
@@ -39,6 +39,16 @@
<component-class>org.richfaces.component.html.HtmlAjaxLog</component-class>
</component>
+ <component>
+ <component-type>org.richfaces.CommandLink</component-type>
+ <component-class>org.richfaces.component.html.HtmlCommandLink</component-class>
+ </component>
+
+ <component>
+ <component-type>org.richfaces.CommandButton</component-type>
+ <component-class>org.richfaces.component.html.HtmlCommandButton</component-class>
+ </component>
+
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
<renderer>
@@ -71,5 +81,15 @@
<renderer-type>org.richfaces.AjaxLogRenderer</renderer-type>
<renderer-class>org.richfaces.renderkit.html.AjaxLogRenderer</renderer-class>
</renderer>
+ <renderer>
+ <component-family>javax.faces.Command</component-family>
+ <renderer-type>org.richfaces.CommandLinkRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.CommandLinkRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>javax.faces.Command</component-family>
+ <renderer-type>org.richfaces.CommandButtonRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.CommandButtonRenderer</renderer-class>
+ </renderer>
</render-kit>
</faces-config>
\ No newline at end of file
Modified:
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/button.template.xml
===================================================================
---
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/button.template.xml 2009-08-21
18:25:38 UTC (rev 15267)
+++
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/button.template.xml 2009-08-21
18:45:20 UTC (rev 15268)
@@ -4,15 +4,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
class="org.richfaces.renderkit.html.CommandButtonRenderer"
superclass="org.richfaces.renderkit.html.AjaxCommandButtonRendererBase"
- componentclass="org.richfaces.component.UIAjaxCommandButton">
+ componentclass="javax.faces.component.UIComponent">
<!-- f:clientid var="clientId"/ -->
<input
id="#{clientId}"
name="#{clientId}"
- value="#{this.getValue(component)}"
- cdk:passThroughWithExclusions="value name onclick type id class"
+ cdk:passThroughWithExclusions="name onclick type id class"
onclick="#{this.getOnClick(context,component)}"
class="#{component.attributes['styleClass']}"
Modified:
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/function.template.xml
===================================================================
---
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/function.template.xml 2009-08-21
18:25:38 UTC (rev 15267)
+++
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/function.template.xml 2009-08-21
18:45:20 UTC (rev 15268)
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
class="org.richfaces.renderkit.html.AjaxFunctionRenderer"
superclass="org.richfaces.renderkit.AjaxFunctionRendererBase"
- componentclass="org.richfaces.component.UIAjaxFunction">
+ componentclass="javax.faces.component.UIComponent">
<!-- f:clientid var="clientId"/ -->
<span id="#{clientId}" style="display: none;">
Modified:
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml
===================================================================
---
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml 2009-08-21
18:25:38 UTC (rev 15267)
+++
root/ui/trunk/components/core/src/main/templates/org/ajax4jsf/renderkit/html/link.template.xml 2009-08-21
18:45:20 UTC (rev 15268)
@@ -4,19 +4,18 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
class="org.richfaces.renderkit.html.CommandLinkRenderer"
superclass="org.richfaces.renderkit.AjaxCommandRendererBase"
- componentclass="org.richfaces.component.UIAjaxCommandLink">
+ componentclass="javax.faces.component.UIComponent">
<!-- f:clientid var="clientId"/ -->
<a
id="#{clientId}"
name="#{clientId}"
- type="#{component.attributes['type']}"
- cdk:passThroughWithExclusions="value name onclick type href id"
+ cdk:passThroughWithExclusions="value name onclick href id"
onclick="#{this.getOnClick(context,component)}"
href="#"
class="#{component.attributes['styleClass']}"
- #{this.getValue(component)}
+ #{component.attributes['value']}
<cdk:body>
<cdk:call expression="renderChildren(context,component);" />
</cdk:body>