Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1-Beta
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Chrome, Firefox, IE, ICEfaces 2.1 BETA, JSF 2.1.1 RI (Mojarra)
-
Assignee Priority:P2
Description
The code in ICEfaces' DataTableRenderer is incorrect and is causing the initial rendering of a lazy table to show now rows, even if the rows are correctly loaded.
////////////////////////////////////////////////////////////////////
DataTableRenderer line 941:
int rowCount = table.getRowCount();
int rowCountToRender = rows == 0 ? rowCount : rows;
boolean hasData = rowCount > 0;
if (table.isLazy()) table.loadLazyData();
////////////////////////////////////////////////////////////////////
The first time this code is called, table.getRowCount() will return 0 because no data has been loaded. The call to table.loadLazyData() should be done before the other lines copied above.
Set an initial rowCount of "1" in my LazyDataModel and the initial rendering of the rows will work because "hasRows" will be true in this case.
However, if this is done and there really is no rows returned by my LazyDataModel, the css classes are not set properly on datatable so I can't style it properly.
Also, if the datatable's getRows is 0 (we want all available rows), it will think the total amount of rows is 1, which is not the case so the workaround is not an acceptable solution.
////////////////////////////////////////////////////////////////////
DataTableRenderer line 941:
int rowCount = table.getRowCount();
int rowCountToRender = rows == 0 ? rowCount : rows;
boolean hasData = rowCount > 0;
if (table.isLazy()) table.loadLazyData();
////////////////////////////////////////////////////////////////////
The first time this code is called, table.getRowCount() will return 0 because no data has been loaded. The call to table.loadLazyData() should be done before the other lines copied above.
Set an initial rowCount of "1" in my LazyDataModel and the initial rendering of the rows will work because "hasRows" will be true in this case.
However, if this is done and there really is no rows returned by my LazyDataModel, the css classes are not set properly on datatable so I can't style it properly.
Also, if the datatable's getRows is 0 (we want all available rows), it will think the total amount of rows is 1, which is not the case so the workaround is not an acceptable solution.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Evgheni Sadovoi
created issue -
Evgheni Sadovoi
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [5007000000JLRpt] |
Evgheni Sadovoi
made changes -
Attachment | InitialLoading.jpg [ 13666 ] |
Evgheni Sadovoi
made changes -
Attachment | AfterPageRefresh.jpg [ 13667 ] |
Evgheni Sadovoi
made changes -
Attachment | TestDataModel.java [ 13668 ] | |
Attachment | simpleDatatableTest.xhtml [ 13669 ] |
Ken Fyten
made changes -
Fix Version/s | 2.1 [ 10241 ] | |
Assignee Priority | P2 | |
Assignee | Nils Lundquist [ nils.lundquist ] |
Nils Lundquist
made changes -
Assignee | Nils Lundquist [ nils.lundquist ] | Evgheni Sadovoi [ evgheni.sadovoi ] |
Evgheni Sadovoi
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 2.1-Beta2 [ 10294 ] | |
Fix Version/s | 2.1 [ 10241 ] | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 3.0 [ 10241 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |