Author: maksimkaszynski
Date: 2008-03-27 13:56:33 -0400 (Thu, 27 Mar 2008)
New Revision: 7320
Added:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/taglib/
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/taglib/ScrollableDataTableTagHandler.java
Modified:
trunk/ui/scrollableDataTable/pom.xml
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java
Log:
http://jira.jboss.com/jira/browse/RF-2669
Modified: trunk/ui/scrollableDataTable/pom.xml
===================================================================
--- trunk/ui/scrollableDataTable/pom.xml 2008-03-27 17:51:02 UTC (rev 7319)
+++ trunk/ui/scrollableDataTable/pom.xml 2008-03-27 17:56:33 UTC (rev 7320)
@@ -77,5 +77,10 @@
<artifactId>dataTable</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project>
Modified:
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
===================================================================
---
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2008-03-27
17:51:02 UTC (rev 7319)
+++
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2008-03-27
17:56:33 UTC (rev 7320)
@@ -39,6 +39,10 @@
<superclassname>org.ajax4jsf.tests.AbstractJspTestCase</superclassname>
</test>
</tag>
+
+ <taghandler generate="false">
+ <classname>org.richfaces.taglib.ScrollableDataTableTagHandler</classname>
+ </taghandler>
<property>
<name>frozenColCount</name>
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
===================================================================
---
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-03-27
17:51:02 UTC (rev 7319)
+++
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-03-27
17:56:33 UTC (rev 7320)
@@ -28,6 +28,7 @@
import org.apache.commons.collections.iterators.IteratorChain;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.richfaces.convert.rowkey.ScrollableDataTableRowKeyConverter;
import org.richfaces.event.AttributeHolder;
import org.richfaces.event.ScrollableGridViewEvent;
import org.richfaces.event.sort.MultiColumnSortListener;
@@ -75,6 +76,9 @@
private SortListener sortListener;
+ private Converter defaultRowKeyConverter = new ScrollableDataTableRowKeyConverter();
+
+
public abstract SortOrder getSortOrder();
public abstract void setSortOrder(SortOrder sortOrder) ;
@@ -434,4 +438,17 @@
}
+ @Override
+ public Converter getRowKeyConverter() {
+ Converter converter = super.getRowKeyConverter();
+ if (null == converter) {
+ return defaultRowKeyConverter;
+ }
+ return converter;
+ }
+
+ @Override
+ public void setRowKeyConverter(Converter rowKeyConverter) {
+ super.setRowKeyConverter(rowKeyConverter);
+ }
}
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java
===================================================================
---
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java 2008-03-27
17:51:02 UTC (rev 7319)
+++
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java 2008-03-27
17:56:33 UTC (rev 7320)
@@ -17,6 +17,9 @@
*/
public class ScrollableDataTableRowKeyConverter implements Converter {
+
+ public static final String CONVERTER_ID =
"org.richfaces.convert.rowkey.ScrollableDataTableRowKeyConverter";
+
/* (non-Javadoc)
* @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext,
javax.faces.component.UIComponent, java.lang.String)
*/
Added:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/taglib/ScrollableDataTableTagHandler.java
===================================================================
---
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/taglib/ScrollableDataTableTagHandler.java
(rev 0)
+++
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/taglib/ScrollableDataTableTagHandler.java 2008-03-27
17:56:33 UTC (rev 7320)
@@ -0,0 +1,33 @@
+/**
+ *
+ */
+package org.richfaces.taglib;
+
+import org.ajax4jsf.taglib.html.facelets.RowKeyConverterRule;
+
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class ScrollableDataTableTagHandler extends ComponentHandler {
+
+ public ScrollableDataTableTagHandler(ComponentConfig config) {
+ super(config);
+ }
+
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected MetaRuleset createMetaRuleset(Class type) {
+
+ MetaRuleset ruleset = super.createMetaRuleset(type);
+
+ ruleset.addRule(RowKeyConverterRule.INSTANCE);
+
+ return ruleset;
+ }
+}