Search
Recent Topics
ListDataModel Listener doesn't get updated.
Forum Index
->
DataTable
Author
Message
03/18/2008 12:47:41
Subject:
ListDataModel Listener doesn't get updated.
ikrahne
Joined: 03/06/2008 08:36:25
Messages: 20
Offline
We discovered a problem while switching to ECruiser DataTable :
We habe a Listener hooked up on a ListDataModel. While rendering, we need to know the current rendered row.
getMyListDataModel().getListener().getCurrentIndex()
The ECruiser component always returns the number of elements in the ListDatatModel, and not the current rendered position. Is there a quick-fix ...
03/19/2008 07:56:14
Subject:
Re:ListDataModel Listener doesn't get updated.
ikrahne
Joined: 03/06/2008 08:36:25
Messages: 20
Offline
Hi,
the problem seems to be in the WrappedDataModel class.
If it wrappes an existing DataModel, it doesn't delegate the setRowIndex Method to the underlying model.
Here's a patch, that worked for me:
Index: /src/main/java/ecruiser/model/WrappedDataModel.java =================================================================== --- /src/main/java/ecruiser/model/WrappedDataModel.java (revision 1334) +++ /src/main/java/ecruiser/model/WrappedDataModel.java (working copy) @@ -120,6 +120,9 @@ if(cachedList != null && oldRowIndex != rowIndex) { Object data = isRowAvailable() ? getRowData() : null; + if (getWrappedModel() != null) { + getWrappedModel().setRowIndex(rowIndex); + } fireRowSelected(rowIndex, data); } }
Forum Index
->
DataTable
Go to:
Select a forum
General
DataTable
Tree
Menu
Tab
Layout
Window
Calendar/Date Input
Lookup/Suggest Input
Powered by
JForum 2.1.7
©
JForum Team
Home
|
News
|
Contact
|
About
|
License
|
Privacy
|
Documentation
Copyright © 2009 Simplica Corporation. All rights reserved.