Author: jbalunas(a)redhat.com
Date: 2010-06-11 11:46:55 -0400 (Fri, 11 Jun 2010)
New Revision: 17617
Added:
root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/config/faces-config.xml
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/config/
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/config/faces-config.xml
Removed:
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/resources/META-INF/faces-config.xml
Modified:
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/java/RichBean.java
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces.js
root/examples/richfaces-showcase/tags/richfaces-showcase-4.0.0.Alpha2/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
Log:
Ported Alpha2 updates to tags for re-release to QE
Modified:
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/java/RichBean.java
===================================================================
---
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/java/RichBean.java 2010-06-11
15:46:55 UTC (rev 17617)
@@ -5,28 +5,21 @@
import java.io.Serializable;
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ViewScoped;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@ManagedBean
-@ViewScoped
public class RichBean implements Serializable {
private static final long serialVersionUID = -2403138958014741653L;
private Logger logger;
private String name;
- @PostConstruct
- public void initialize() {
+ public RichBean() {
logger = LoggerFactory.getLogger(RichBean.class);
logger.info("post construct: initialize");
name = "John";
}
-
+
public String getName() {
return name;
}
Modified:
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/archetypes/richfaces-archetype-simpleapp/tags/richfaces-archetype-simpleapp-4.0.0.Alpha2/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml 2010-06-11
15:46:55 UTC (rev 17617)
@@ -2,4 +2,14 @@
<faces-config version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
+ <!--
+ This is a workaround for JBoss AS 6 currently not processing JSF annotations.
+ TODO: review and revert back to annotations.
+ -->
+ <managed-bean>
+ <managed-bean-name>richBean</managed-bean-name>
+ <managed-bean-class>${package}.RichBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+
</faces-config>
Modified:
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js
===================================================================
---
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2010-06-11
15:46:55 UTC (rev 17617)
@@ -106,7 +106,8 @@
}
}
- this.event = event;
+ // copy of event should be created otherwise IE will fail
+ this.event = $.extend({}, event);
//requestGroupId is mutable, thus we need special field for it
this.requestGroupId = this.queueOptions.requestGroupId;
@@ -240,11 +241,8 @@
entry = lastRequestedEntry = items.shift();
log.debug("richfaces.queue: will submit request NOW");
var o = lastRequestedEntry.options;
- // copy of event should be created otherwise IE will fail
- var e = $.extend({}, lastRequestedEntry.event);
- //lastRequestedEntry.source.appendParameter("AJAX:EVENTS_COUNT",
lastRequestedEntry.eventsCount);
o["AJAX:EVENTS_COUNT"] = lastRequestedEntry.eventsCount;
- richfaces.ajax.jsfRequest(lastRequestedEntry.source, e, o);
+ richfaces.ajax.jsfRequest(lastRequestedEntry.source, lastRequestedEntry.event, o);
// call event handlers
if (o.queueonsubmit) {
Modified:
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
---
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces.js 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/core/tags/richfaces-core-4.0.0.Alpha2/impl/src/main/resources/META-INF/resources/richfaces.js 2010-06-11
15:46:55 UTC (rev 17617)
@@ -560,6 +560,7 @@
richfaces.ajax = function(source, event, options) {
var sourceId = (typeof source == 'object' && source.id) ? source.id :
source;
+ var sourceElt = (typeof source == 'object') ? source :
document.getElementById(sourceId);
options = options || {};
@@ -599,7 +600,9 @@
}
}
- parameters[sourceId] = sourceId;
+ if (!jQuery(sourceElt).is(":input:not(:submit, :button, :image, :reset)")) {
+ parameters[sourceId] = sourceId;
+ }
if (eventHandlers) {
var eventsAdapter = richfaces.createJSFEventsAdapter(eventHandlers);
Modified:
root/examples/richfaces-showcase/tags/richfaces-showcase-4.0.0.Alpha2/src/main/webapp/richfaces/dataTable/tableStyling.xhtml
===================================================================
---
root/examples/richfaces-showcase/tags/richfaces-showcase-4.0.0.Alpha2/src/main/webapp/richfaces/dataTable/tableStyling.xhtml 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/examples/richfaces-showcase/tags/richfaces-showcase-4.0.0.Alpha2/src/main/webapp/richfaces/dataTable/tableStyling.xhtml 2010-06-11
15:46:55 UTC (rev 17617)
@@ -9,11 +9,11 @@
<ui:composition>
<style>
-.stable tr:nth-child(even) {
+.even-row {
background-color: #FCFFFE;
}
-.stable tr:nth-child(odd) {
+.odd-row {
background-color: #ECF3FE;
}
@@ -63,6 +63,10 @@
<script>
$('.stable tr').mouseover(function(){$(this).addClass('active-row')});
$('.stable
tr').mouseout(function(){$(this).removeClass('active-row')});
+
+ $('.stable tr:odd').addClass('odd-row');
+ $('.stable tr:even').addClass('even-row');
+
</script>
</ui:composition>
</html>
\ No newline at end of file
Added:
root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/config/faces-config.xml
===================================================================
--- root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/config/faces-config.xml
(rev 0)
+++
root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/config/faces-config.xml 2010-06-11
15:46:55 UTC (rev 17617)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<faces-config version="2.0" metadata-complete="false"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:cdk="http://richfaces.org/cdk/extensions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <client-behavior-renderer>
+
<client-behavior-renderer-type>org.ajax4jsf.behavior.Ajax</client-behavior-renderer-type>
+
<client-behavior-renderer-class>org.ajax4jsf.renderkit.AjaxBehaviorRenderer</client-behavior-renderer-class>
+ </client-behavior-renderer>
+ </render-kit>
+</faces-config>
Modified:
root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java
===================================================================
---
root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/ui/core/tags/richfaces-ui-core-4.0.0.Alpha2/ui/src/main/java/org/ajax4jsf/component/behavior/MethodExpressionAjaxBehaviorListener.java 2010-06-11
15:46:55 UTC (rev 17617)
@@ -26,6 +26,7 @@
import javax.el.ELException;
import javax.el.MethodExpression;
import javax.el.MethodNotFoundException;
+import javax.faces.component.StateHolder;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.AjaxBehaviorEvent;
@@ -35,13 +36,15 @@
* @author Anton Belevich
*
*/
-public class MethodExpressionAjaxBehaviorListener implements AjaxBehaviorListener {
+public class MethodExpressionAjaxBehaviorListener implements AjaxBehaviorListener,
StateHolder {
private static final Class<?>[] ACTION_LISTENER_ZEROARG_SIG = new Class[] {};
private MethodExpression methodExpressionOneArg = null;
private MethodExpression methodExpressionZeroArg = null;
+
+ private boolean isTransient;
public MethodExpressionAjaxBehaviorListener() {
}
@@ -96,4 +99,30 @@
}
}
+ public boolean isTransient() {
+ return isTransient;
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ isTransient = newTransientValue;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (state == null) {
+ return;
+ }
+ methodExpressionOneArg = (MethodExpression) ((Object[]) state)[0];
+ methodExpressionZeroArg = (MethodExpression) ((Object[]) state)[1];
+ }
+
+ public Object saveState(FacesContext context) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ return new Object[] { methodExpressionOneArg, methodExpressionZeroArg };
+ }
+
}
Added:
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/config/faces-config.xml
===================================================================
---
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/config/faces-config.xml
(rev 0)
+++
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/config/faces-config.xml 2010-06-11
15:46:55 UTC (rev 17617)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<faces-config version="2.0" metadata-complete="false"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:cdk="http://richfaces.org/cdk/extensions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+<component>
+ <component-type>org.richfaces.HashParameter</component-type>
+ <component-class>org.richfaces.component.UIHashParameter</component-class>
+ <component-extension>
+ <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions">false</cd...
+ </component-extension>
+</component>
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <client-behavior-renderer>
+ <client-behavior-renderer-type>org.richfaces.behavior.ComponentControlBehavior</client-behavior-renderer-type>
+ <client-behavior-renderer-class>org.richfaces.renderkit.ComponentControlBehaviorRenderer</client-behavior-renderer-class>
+ </client-behavior-renderer>
+ </render-kit>
+</faces-config>
\ No newline at end of file
Modified:
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
===================================================================
---
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-06-11
15:46:55 UTC (rev 17617)
@@ -26,15 +26,17 @@
import java.util.List;
import javax.faces.component.UIComponent;
-import javax.faces.component.behavior.FacesBehavior;
import org.ajax4jsf.component.behavior.ClientBehavior;
+import org.richfaces.cdk.annotations.JsfBehavior;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
/**
* @author Anton Belevich
*
*/
-@FacesBehavior(value = "org.richfaces.behavior.ComponentControlBehavior")
+@JsfBehavior(id = "org.richfaces.behavior.ComponentControlBehavior", tag =
@Tag(name = "componentControl", handler =
"org.richfaces.taglib.ComponentControlHandler", type = TagType.Facelets))
public class ComponentControlBehavior extends ClientBehavior {
public static final String BEHAVIOR_ID =
"org.richfaces.behavior.ComponentControlBehavior";
@@ -42,7 +44,7 @@
private List<UIComponent> children;
enum PropertyKeys {
- event, target, selector, parameters, operation
+ event, target, selector, operation
}
public List<UIComponent> getChildren() {
@@ -96,7 +98,7 @@
} else if (compare(PropertyKeys.target, name)) {
setTarget((String) value);
} else if (compare(PropertyKeys.selector, name)) {
- setSelector((String) name);
+ setSelector((String) value);
}
}
}
Deleted:
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/resources/META-INF/faces-config.xml
===================================================================
---
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/resources/META-INF/faces-config.xml 2010-06-11
15:45:59 UTC (rev 17616)
+++
root/ui/misc/tags/richfaces-ui-misc-4.0.0.Alpha2/componentcontrol/src/main/resources/META-INF/faces-config.xml 2010-06-11
15:46:55 UTC (rev 17617)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
-<faces-config version="2.0" metadata-complete="false"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:cdk="http://richfaces.org/cdk/extensions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-<component>
- <component-type>org.richfaces.HashParameter</component-type>
- <component-class>org.richfaces.component.UIHashParameter</component-class>
- <component-extension>
- <cdk:generate
xmlns:cdk="http://richfaces.org/cdk/extensions">false</cd...
- </component-extension>
- </component>
-</faces-config>
\ No newline at end of file