You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by to...@apache.org on 2006/04/19 16:48:42 UTC
svn commit: r395257 - in /myfaces/tomahawk/trunk:
core/src/main/java/org/apache/myfaces/taglib/html/ext/
examples/simple/src/main/java/org/apache/myfaces/examples/listexample/
examples/simple/src/main/webapp/
Author: tomsp
Date: Wed Apr 19 07:48:41 2006
New Revision: 395257
URL: http://svn.apache.org/viewcvs?rev=395257&view=rev
Log:
groupBy feature for dataTable
Added:
myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleDemo.java
myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleGroupByList.java
Modified:
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlDataTableTag.java
myfaces/tomahawk/trunk/examples/simple/src/main/webapp/simpleGroupBy.jsp
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlDataTableTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlDataTableTag.java?rev=395257&r1=395256&r2=395257&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlDataTableTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/taglib/html/ext/HtmlDataTableTag.java Wed Apr 19 07:48:41 2006
@@ -138,7 +138,7 @@
setStringProperty(component, JSFAttr.ROW_STYLECLASS_ATTR, _rowStyleClass);
setStringProperty(component, JSFAttr.ROW_STYLE_ATTR, _rowStyle);
setStringProperty(component, "rowGroupStyle", _rowGroupStyle);
- setStringProperty(component, "rowGroupStyleClasses", _rowGroupStyleClass);
+ setStringProperty(component, "rowGroupStyleClass", _rowGroupStyleClass);
}
public void setPreserveDataModel(String preserveDataModel)
Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleDemo.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleDemo.java?rev=395257&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleDemo.java (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleDemo.java Wed Apr 19 07:48:41 2006
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.listexample;
+
+import java.io.Serializable;
+
+/**
+ * DOCUMENT ME!
+ * @author Thomas Spiegl (latest modification by $Author: werpu $)
+ * @version $Revision: 371731 $ $Date: 2006-01-24 01:18:44 +0100 (Di, 24 Jan 2006) $
+ */
+public class SimpleDemo
+ implements Serializable
+{
+ /**
+ * serial id for serialisation versioning
+ */
+ private static final long serialVersionUID = 1L;
+ private int _id;
+ private String _value1;
+ private String _value2;
+
+ public SimpleDemo(int id, String type, String color)
+ {
+ _id = id;
+ _value1 = type;
+ _value2 = color;
+ }
+
+ public int getId()
+ {
+ return _id;
+ }
+
+ public void setId(int id)
+ {
+ _id = id;
+ }
+
+ public String getValue1()
+ {
+ return _value1;
+ }
+
+ public void setValue1(String value1)
+ {
+ _value1 = value1;
+ }
+
+ public String getValue2()
+ {
+ return _value2;
+ }
+
+ public void setValue2(String value2)
+ {
+ _value2 = value2;
+ }
+}
Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleGroupByList.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleGroupByList.java?rev=395257&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleGroupByList.java (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/listexample/SimpleGroupByList.java Wed Apr 19 07:48:41 2006
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.examples.listexample;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SimpleGroupByList
+{
+ private List _demoList = new ArrayList();
+
+ private Map _demoListMap = new HashMap();
+
+ public SimpleGroupByList()
+ {
+ for (int i = 0; i < 12; i++)
+ {
+ Object demo = new SimpleDemo(i, (i < 3 )? "Group 1":(i < 6 ) ? "Group 2": (i < 9)?"Group 3":"Group 4", "Item "+i);
+ _demoList.add(demo);
+ _demoListMap.put(new Integer(i), demo);
+ }
+ }
+
+ public List getDemoList()
+ {
+ return _demoList;
+ }
+
+ public void setDemoList(List demo)
+ {
+ _demoList = demo;
+ }
+
+}
Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/simpleGroupBy.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/simpleGroupBy.jsp?rev=395257&r1=395256&r2=395257&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/simpleGroupBy.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/simpleGroupBy.jsp Wed Apr 19 07:48:41 2006
@@ -36,11 +36,11 @@
headerClass="standardTable_Header"
footerClass="standardTable_Header"
rowClasses="standardTable_Row1,standardTable_Row2"
-
var="demo"
value="#{simpleGroupBy.demoList}"
preserveDataModel="true"
- rowGroupStyle="border-bottom:blue;border-bottom-style:solid;border-bottom-width:2px;vertical-align:top">
+ rowGroupStyle="border-bottom:blue;border-bottom-style:solid;border-bottom-width:2px;vertical-align:top"
+ rowGroupStyleClass="testclass">
<t:column groupBy="true">
<f:facet name="header">
<h:outputText value="Groups" />