Author: pgolawski
Date: 2008-09-23 02:39:57 -0400 (Tue, 23 Sep 2008)
New Revision: 10539
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java
Log:
set event handler for onselectionchange by default
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java
===================================================================
---
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java 2008-09-23
06:38:26 UTC (rev 10538)
+++
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java 2008-09-23
06:39:57 UTC (rev 10539)
@@ -17,6 +17,7 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.model.selection.ClientSelection;
@@ -202,14 +203,7 @@
attribut = "";
}
scriptOptions.addOption("selectionMode", attribut);
-
- attribut = attributes.get("onselectionchange");
- if (attribut == null) {
- attribut = "";
- }
- JSFunctionDefinition function = new JSFunctionDefinition();
- function.addToBody(attribut);
- scriptOptions.addEventHandler("onselectionchange", function);
+ scriptOptions.addEventHandler("onselectionchange");
return scriptOptions;
}