Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.3, EE-3.3.0.GA_P01
-
Fix Version/s: EE-3.3.0.GA_P02, 4.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:jsf 2 icefaces ace
-
Assignee Priority:P3
-
ICEsoft Forum Reference:
Description
Currently, el expressions are not supported in lazy loading ace:dataTable when using dynamic ace:column and sortBy or filterBy. The el currently gets resolved as a String.
See also http://jira.icesoft.org/browse/ICE-8378
for more details as well as the older forum reference
http://www.icesoft.org/JForum/posts/list/21598.page#sthash.YUID2JXd.dpbs
http://www.icesoft.org/JForum/posts/list/22496.page
See also http://jira.icesoft.org/browse/ICE-8378
for more details as well as the older forum reference
http://www.icesoft.org/JForum/posts/list/21598.page#sthash.YUID2JXd.dpbs
http://www.icesoft.org/JForum/posts/list/22496.page
Activity
Judy Guglielmin
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Arturo Zambrano [ artzambrano ] | |
Fix Version/s | EE-3.3.0.GA_P02 [ 11371 ] | |
Fix Version/s | 4.0 [ 11382 ] | |
Affects Version/s | 3.3 [ 10370 ] | |
Affects Version/s | 4.0.BETA [ 10770 ] | |
Assignee Priority | P3 [ 10012 ] |
Arturo Zambrano
made changes -
Description |
Currently, el expressions are not supported in lazy loading ace:dataTable when using dynamic ace:column and sortBy or filterBy. The el currently gets resolved as a String.
See also http://jira.icesoft.org/browse/ICE-8378 for more details as well as the older forum reference http://www.icesoft.org/JForum/posts/list/21598.page#sthash.YUID2JXd.dpbs |
Currently, el expressions are not supported in lazy loading ace:dataTable when using dynamic ace:column and sortBy or filterBy. The el currently gets resolved as a String.
See also http://jira.icesoft.org/browse/ICE-8378 for more details as well as the older forum reference http://www.icesoft.org/JForum/posts/list/21598.page#sthash.YUID2JXd.dpbs http://www.icesoft.org/JForum/posts/list/22496.page |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #40908 | Thu May 01 12:37:21 MDT 2014 | art.zambrano | |
Files Changed | ||||
MODIFY
/icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/column/IProxiableColumn.java
MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/column/ProxiedBodyColumn.java MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/column/ColumnMeta.java MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/model/table/SortCriteria.java |
Arturo Zambrano
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
After developing a test case and trying to add this improvement, I realized that it's not possible to accomplish this in the way we intended.
For lazy loading cases, we simply pass the property name itself to the load method, so that the app developer can identify which column was filtered and/or sorted, since we can't do the filtering and sorting from our component code since the entire data set is not in memory. Thus, we allow developers to proceed in any way they want.
For example, if a column is defined like this:
<ace:column headerText="Artist" sortBy="#{track.artist}" filterBy="#{track.artist}"/>
We would pass the string 'artist' to the load() method of LazyDataModel as part of both the 'sortCriteria' and 'filters' objects. We do this by simply parsing the original expression string from the ValueExpression object and obtaining the property name. The problem described by this JIRA is that it's not possible to define columns using c:forEach, since the property names for sortBy and filterBy are incorrectly parsed/resolved. However, this seems not to be possible after all, as explained below.
In the test case I developed, I define a set of columns in this way:
And in the backing bean I have this:
In other words, there's a "column model" class (Col) that is used to dynamically define columns by specifying a header name and a property name, for sorting and filtering purposes, using c:forEach.
The problem is that when using this approach, we cannot resolve the property names for sorting and filtering. With the current code, we simply pass a "prop]" string in all cases, because our parsing function doesn't account for dynamic EL expressions (or expressions containing the [] notation). Moreover, after trying to resolve these EL expressions properly, I found out that it's impossible; the returned value of evaluating such expression is always null. It seems to be due to the fact that the c:forEach variable ('col' in this case) is no longer in the ELContext object, since the c:forEach tag had already been processed to create those components. So, in this case, it's not possible to resolve the value of the 'col' variable. Besides that, there doesn't seem to be a way to partially evaluate a (dynamic) EL expression to obtain a new expression string that we could parse. Only the original expression string is available (in this case, '#{track[col.prop]}'). Also, using $ or # expressions makes no difference.
I also tried pushing and popping the column components to/from EL when trying to evaluate the expressions, and I also tried creating new custom value expressions and try to resolve a simpler expression involving the c:forEach variable, but none of that worked.