[richfaces-issues] [JBoss JIRA] Updated: (RF-7454) Is it correct for ExtendedDataTableRenderer to call getRowCount in doEncodeBegin

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Fri Jun 26 10:56:57 EDT 2009


     [ https://jira.jboss.org/jira/browse/RF-7454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-7454:
-------------------------------

      Component/s: component-tables
    Fix Version/s: Future
         Assignee: Nick Belaevski
         Priority: Minor  (was: Major)


> 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
>          Components: component-tables
>    Affects Versions: 3.3.1
>         Environment: JBoss 4.2
>            Reporter: Mustafa Var
>            Assignee: Nick Belaevski
>            Priority: Minor
>             Fix For: Future
>
>         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