[richfaces-svn-commits] JBoss Rich Faces SVN: r18707 - in trunk/ui/iteration/ui/src/main: java/org/richfaces/event and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Aug 17 09:38:50 EDT 2010


Author: abelevich
Date: 2010-08-17 09:38:49 -0400 (Tue, 17 Aug 2010)
New Revision: 18707

Added:
   trunk/ui/iteration/ui/src/main/resources/META-INF/dataTable.faces-config.xml
Modified:
   trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
   trunk/ui/iteration/ui/src/main/java/org/richfaces/event/DataTablePreRenderListener.java
Log:
add dataTablePreRenderListener registration, fix selection clientBehavior

Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java	2010-08-17 13:34:21 UTC (rev 18706)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java	2010-08-17 13:38:49 UTC (rev 18707)
@@ -33,6 +33,7 @@
 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;
@@ -74,8 +75,14 @@
     }
     
     @Attribute(defaultValue = "0")
-    public abstract int getFrozenColumns(); 
+    public abstract int getFrozenColumns();
     
+    @Attribute(events=@EventName(value="selectionchange", defaultEvent=true))
+    public abstract String getOnselectionchange();
+
+    @Attribute(events=@EventName("beforeselectionchange"))
+    public abstract String getOnbeforeselectionchange();
+
     public String resolveClientId(FacesContext facesContext, UIComponent contextComponent, String metaComponentId) {
         if (SCROLL.equals(metaComponentId)) {
             Object oldRowKey = getRowKey();

Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/event/DataTablePreRenderListener.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/event/DataTablePreRenderListener.java	2010-08-17 13:34:21 UTC (rev 18706)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/event/DataTablePreRenderListener.java	2010-08-17 13:38:49 UTC (rev 18707)
@@ -37,12 +37,13 @@
 
 import org.ajax4jsf.Messages;
 import org.richfaces.DataScrollerUtils;
+import org.richfaces.component.AbstractDataScroller;
 import org.richfaces.component.UIDataAdaptor;
-import org.richfaces.component.AbstractDataScroller;
 import org.richfaces.component.util.MessageUtil;
 import org.richfaces.log.RichfacesLogger;
 import org.slf4j.Logger;
 
+
 public class DataTablePreRenderListener implements SystemEventListener {
 
     private static final Logger LOG = RichfacesLogger.COMPONENTS.getLogger();

Added: trunk/ui/iteration/ui/src/main/resources/META-INF/dataTable.faces-config.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/dataTable.faces-config.xml	                        (rev 0)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/dataTable.faces-config.xml	2010-08-17 13:38:49 UTC (rev 18707)
@@ -0,0 +1,35 @@
+<?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.
+-->
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+	version="2.0">
+
+	<application>
+		<system-event-listener>	
+			<system-event-listener-class>org.richfaces.event.DataTablePreRenderListener</system-event-listener-class>
+			<system-event-class>javax.faces.event.PreRenderComponentEvent</system-event-class>
+		</system-event-listener>
+	</application>
+</faces-config>
\ No newline at end of file



More information about the richfaces-svn-commits mailing list