[richfaces-issues] [JBoss JIRA] Updated: (RF-7454) Is it correct for ExtendedDataTableRenderer to call getRowCount in doEncodeBegin
Mustafa Var (JIRA)
jira-events at lists.jboss.org
Fri Jun 26 09:14:56 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-7454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mustafa Var updated RF-7454:
----------------------------
Attachment: extendedDataTable_noData.jpg
problem can also be seen in attached image
> Is it correct for ExtendedDataTableRenderer to call getRowCount in doEncodeBegin
> --------------------------------------------------------------------------------
>
> Key: RF-7454
> URL: https://jira.jboss.org/jira/browse/RF-7454
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.3.1
> Environment: JBoss 4.2
> Reporter: Mustafa Var
> Attachments: extendedDataTable_noData.jpg
>
>
> When I use <rich:extendedDataTable>,ExtendedDataModel and Modifiable for dynamic data gathering
> (I only select data in the range through DB inside ExtendedDataModel's walk() method)
> ExtendedDataTableRenderer calls getRowCount inside doEncodeBegin() method and it checks rowCount to print the "No data" as the first row of data table.
> But of course my rowCount changes when I filter data through DB(in walk method),
> however getRowCount is called inside doEncodeBegin (it is before calling walk method)
> That's why getRowCount returns the previous row count of the dataTable and although I have data in list it sometimes prints "No data" as the first row of data table or vice versa
> (do not print "No data" although I have no data in data table)
> As a workaround I check the caller of the getRowCount method in my model implementation
> public int getRowCount() {
> if("ExtendedDataTableRenderer.java".equals(Thread.currentThread().getStackTrace()[4].getFileName())
> && "doEncodeBegin".equals(Thread.currentThread().getStackTrace()[4].getMethodName())){
> return 1;
> }
> return rowCount;
> }
> and I do not print "No data" at any time.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list