Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 4.0
-
Fix Version/s: 4.1
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Any
-
Assignee Priority:P1
Description
Add the ability to filter rows based on a range of values for a given column, so that all values within the specified minimum and maximum values are matched and rendered on the page. This would only apply to numerical and Date types.
Issue Links
- blocks
-
ICE-10446 ace:dataTable - Add ability to filter Date values via a date picker/range
-
- Closed
-
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Committed improvement at revision 46074.
As described in ICE-10446, the revised behaviour of this feature is as follows:
- The user has the option of setting the 'type' attribute on the ace:column tag to declare the data type used in that column. The default value for this attribute is 'TEXT'. So, if the user doesn't set this attribute, things will continue to work normally as in previous versions. The supported types are TEXT, DATE, BOOLEAN, BYTE, SHORT, INT, LONG, FLOAT and DOUBLE.
- If the user desires to do the filtering based on a range of values, rather than a single value, they would have to set the 'filterRange' attribute to true, in the ace:column tag as well. The default value of this attribute would be false, so that things continue to work normally if it's not set.
- If the user wants to programmatically change the minimum and maximum values for a range or if they want to give starting values to one or both of them, they would be able to do so by binding the corresponding data to the attributes 'filterValueMin' and 'filterValueMax'.
- When using the DATE type, users can specify a Date pattern via the 'filterDatePattern' attribute, which works like the ace:dateTimEEntry's 'pattern' attribute. Likewise, a Locale can be specified via the 'filterDateLocale' attribute, which works in the same way as the ace:dateTimeEntry's 'locale'.
- The data type for filtering purposes is only specified via the 'type' attribute. It is not deduced from the object type being processed. So, if the data type is actually Date or Double and the 'type' attribute is not set (or if it is explicitly set to 'text'), those values will be treated as strings, in order to preserve backwards compatibility. Only when a specific data type is specified through this attribute, the data will be treated differently for the purposes of filtering.
- If only the minimum value is provided by the app developer, the rows whose value for that column is equal or greater than such minimum value will match the filter query.
- If only the maximum value is provided by the app developer, the rows whose value for that column is equal or less than such maximum value will match the filter query.
- The 'filterMatchMode' options only apply to TEXT types.
- Global filtering is only applied to (non-range) TEXT types.
- For the lazy mode, a new property 'columns' was added to LazyDataModel. The ace:dataTable will call setColumns(getColumns(true) before invoking the load method. App developers can access these column objects to obtain the minimum and maximum filter values when using range filtering.
Show
Arturo Zambrano
added a comment - - edited Committed improvement at revision 46074.
As described in ICE-10446 , the revised behaviour of this feature is as follows:
The user has the option of setting the 'type' attribute on the ace:column tag to declare the data type used in that column. The default value for this attribute is 'TEXT'. So, if the user doesn't set this attribute, things will continue to work normally as in previous versions. The supported types are TEXT, DATE, BOOLEAN, BYTE, SHORT, INT, LONG, FLOAT and DOUBLE.
If the user desires to do the filtering based on a range of values, rather than a single value, they would have to set the 'filterRange' attribute to true, in the ace:column tag as well. The default value of this attribute would be false, so that things continue to work normally if it's not set.
If the user wants to programmatically change the minimum and maximum values for a range or if they want to give starting values to one or both of them, they would be able to do so by binding the corresponding data to the attributes 'filterValueMin' and 'filterValueMax'.
When using the DATE type, users can specify a Date pattern via the 'filterDatePattern' attribute, which works like the ace:dateTimEEntry's 'pattern' attribute. Likewise, a Locale can be specified via the 'filterDateLocale' attribute, which works in the same way as the ace:dateTimeEntry's 'locale'.
The data type for filtering purposes is only specified via the 'type' attribute. It is not deduced from the object type being processed. So, if the data type is actually Date or Double and the 'type' attribute is not set (or if it is explicitly set to 'text'), those values will be treated as strings, in order to preserve backwards compatibility. Only when a specific data type is specified through this attribute, the data will be treated differently for the purposes of filtering.
If only the minimum value is provided by the app developer, the rows whose value for that column is equal or greater than such minimum value will match the filter query.
If only the maximum value is provided by the app developer, the rows whose value for that column is equal or less than such maximum value will match the filter query.
The 'filterMatchMode' options only apply to TEXT types.
Global filtering is only applied to (non-range) TEXT types.
For the lazy mode, a new property 'columns' was added to LazyDataModel. The ace:dataTable will call setColumns(getColumns(true) before invoking the load method. App developers can access these column objects to obtain the minimum and maximum filter values when using range filtering.
If the user enters a higher minimum than maximum could we swap the values, or at least notify them? For example in the showcase you can enter minimum 5000 Weight and maximum 100 Weight and no results come up. Seems like it could be friendlier.