Author: konstantin.mishin
Date: 2008-03-10 14:42:07 -0400 (Mon, 10 Mar 2008)
New Revision: 6661
Modified:
trunk/ui/columns/src/main/config/component/columns.xml
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
Log:
RF-2413
Modified: trunk/ui/columns/src/main/config/component/columns.xml
===================================================================
--- trunk/ui/columns/src/main/config/component/columns.xml 2008-03-10 18:25:30 UTC (rev
6660)
+++ trunk/ui/columns/src/main/config/component/columns.xml 2008-03-10 18:42:07 UTC (rev
6661)
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd"
+[
+<!ENTITY attributes SYSTEM
"../../../../../dataTable/src/main/config/component/columnAttributes.ent">
+]
+>
<components>
<component generate="false">
<name>org.richfaces.Column</name>
@@ -20,7 +24,7 @@
<classname>org.richfaces.taglib.ColumnsTagHandler</classname>
</taghandler>
&ui_data_attributes;
- &html_universal_attributes;
+ &attributes;
<property>
<name>value</name>
<classname>java.lang.Object</classname>
@@ -29,13 +33,6 @@
</description>
</property>
<property>
- <name>var</name>
- <classname>java.lang.Object</classname>
- <description>
- The current value for this component
- </description>
- </property>
- <property>
<name>index</name>
<classname>java.lang.Object</classname>
<description>
@@ -63,81 +60,5 @@
The last iteration item
</description>
</property>
- <property disabled="true">
- <name>header</name>
- </property>
- <property disabled="true">
- <name>footer</name>
- </property>
- <property>
- <name>colspan</name>
- <classname>int</classname>
- <description>Corresponds to the HTML colspan attribute</description>
- </property>
- <property>
- <name>rowspan</name>
- <classname>int</classname>
- <description>Corresponds to the HTML rowspan attribute</description>
- </property>
- <property>
- <name>breakBefore</name>
- <classname>boolean</classname>
- <description>if "true" next column begins from the first
row</description>
- </property>
- <property>
- <name>headerClass</name>
- <classname>java.lang.String</classname>
- <description>Space-separated list of CSS style class(es) that are be applied to
any header generated for this table</description>
- </property>
- <property>
- <name>footerClass</name>
- <classname>java.lang.String</classname>
- <description>Space-separated list of CSS style class(es) that are be applied to
any footer generated for this table</description>
- </property>
- <property>
- <name>width</name>
- <classname>java.lang.String</classname>
- <description>
- Attribute defines width of column. Default value is "100px".
- </description>
- <defaultvalue>"100px"</defaultvalue>
- </property>
- <property>
- <name>sortable</name>
- <classname>boolean</classname>
- <description>Boolean attribute. If "true" it's possible to sort
the column content after click on the header.
- Default value is "true"
- </description>
- <defaultvalue>true</defaultvalue>
- </property>
- <property>
- <name>sortExpression</name>
- <classname>java.lang.String</classname>
- <description>Attribute defines a bean property which is used for sorting of a
column</description>
- </property>
- <property>
- <name>sortOrder</name>
- <classname>org.richfaces.model.Ordering</classname>
- <description>SortOrder is an enumeration of the possible sort
orderings.</description>
- <defaultvalue>Ordering.UNSORTED</defaultvalue>
- </property>
- <property>
- <name>comparator</name>
- <classname>java.util.Comparator</classname>
- <description></description>
- </property>
- <property>
- <name>selfSorted</name>
- <classname>boolean</classname>
- <description></description>
- <defaultvalue>true</defaultvalue>
- </property>
- <property>
- <name>dir</name>
- <classname>java.lang.String</classname>
- <description></description>
- </property>
</component>
-
-
</components>
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2008-03-10
18:25:30 UTC (rev 6660)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2008-03-10
18:42:07 UTC (rev 6661)
@@ -14,12 +14,12 @@
import java.util.Map;
import javax.el.ELException;
+import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.el.VariableMapper;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.webapp.UIComponentClassicTagBase;
-import javax.faces.webapp.UIComponentTag;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.PageContext;
@@ -319,7 +319,21 @@
*/
private ValueExpression _sortable;
- /**
+ /*
+ * sortBy
+ * Attribute defines a bean property which is used for sorting of a column
+ */
+ private ValueExpression _sortBy;
+ /**
+ * Attribute defines a bean property which is used for sorting of a column
+ * Setter for sortBy
+ * @param sortBy - new value
+ */
+ public void setSortBy( ValueExpression __sortBy ){
+ this._sortBy = __sortBy;
+ }
+
+ /**
* sortOrder SortOrder is an enumeration of the possible sort orderings.
*/
private ValueExpression _sortOrder;
@@ -369,7 +383,96 @@
this._comparator = __comparator;
}
- /**
+ /*
+ * filterBy
+ *
+ */
+ private ValueExpression _filterBy;
+ /**
+ *
+ * Setter for filterBy
+ * @param filterBy - new value
+ */
+ public void setFilterBy( ValueExpression __filterBy ){
+ this._filterBy = __filterBy;
+ }
+
+
+ /*
+ * filterDefaultLabel
+ *
+ */
+ private ValueExpression _filterDefaultLabel;
+ /**
+ *
+ * Setter for filterDefaultLabel
+ * @param filterDefaultLabel - new value
+ */
+ public void setFilterDefaultLabel( ValueExpression __filterDefaultLabel ){
+ this._filterDefaultLabel = __filterDefaultLabel;
+ }
+
+
+ /*
+ * filterEvent
+ * Event for filter input that forces the filtration (default = onchange)
+ */
+ private ValueExpression _filterEvent;
+ /**
+ * Event for filter input that forces the filtration (default = onchange)
+ * Setter for filterEvent
+ * @param filterEvent - new value
+ */
+ public void setFilterEvent( ValueExpression __filterEvent ){
+ this._filterEvent = __filterEvent;
+ }
+
+
+ /*
+ * filterExpression
+ * Attribute defines a bean property which is used for filtering of a column
+ */
+ private ValueExpression _filterExpression;
+ /**
+ * Attribute defines a bean property which is used for filtering of a column
+ * Setter for filterExpression
+ * @param filterExpression - new value
+ */
+ public void setFilterExpression( ValueExpression __filterExpression ){
+ this._filterExpression = __filterExpression;
+ }
+
+
+ /*
+ * filterMethod
+ *
+ */
+ private MethodExpression _filterMethod;
+ /**
+ *
+ * Setter for filterMethod
+ * @param filterMethod - new value
+ */
+ public void setFilterMethod( MethodExpression __filterMethod ){
+ this._filterMethod = __filterMethod;
+ }
+
+
+ /*
+ * filterValue
+ *
+ */
+ private ValueExpression _filterValue;
+ /**
+ *
+ * Setter for filterValue
+ * @param filterValue - new value
+ */
+ public void setFilterValue( ValueExpression __filterValue ){
+ this._filterValue = __filterValue;
+ }
+
+ /**
* Boolean attribute. If "true" it's possible to sort the column
content
* after click on the header. Default value is "true" Setter for sortable
*
@@ -621,6 +724,15 @@
column.setValueExpression("comparator", _comparator);
column.setValueExpression("selfSorted", _selfSorted);
column.setValueExpression("dir", _dir);
+
+ column.setValueExpression("filterBy", _filterBy);
+ column.setValueExpression("filterDefaultLabel", _filterDefaultLabel);
+ column.setValueExpression("filterEvent", _filterEvent);
+ column.setValueExpression("filterExpression", _filterExpression);
+ ((UIColumn)column).setFilterMethod(_filterMethod);
+ column.setValueExpression("filterValue", _filterValue);
+ column.setValueExpression("sortBy", _sortBy);
+
}
/**
Show replies by date