Hi,
I´m using smartgwtee 2.2, Mac, Safari. I have the following problem:
I have two ListGrids (LG A and B). After clicking on a RecordListGrid in LG B, I want to display and select the same Record but in LG A. After calling the method LG A.getRecordIndex(record), the result is -1.
(I suspect that LG A does not recognize the selected ListGridRecord from LG)
code:
// In Event / DoubleClickHandler, retrieve the selected record (After double click!)
public void onDoubleClick(DoubleClickEvent aEvent) {
Object source = aEvent.getSource();
if(source != null && source instanceof ListGrid){
ListGridRecord selGHRecord = ((ListGrid)source).getSelectedRecord();
if(selGHRecord != null){
mainWindow.setGHSearchResult(selGHRecord);
}
}
}
// Called method in main class
public void setGHSearchResult(ListGridRecord selGHRecord){
...
// Display GH in ListGrid (works fine!)
Criteria gpHeaderCriteria = new Criteria();
gpHeaderCriteria.addCriteria("fkbhid", new Integer(1));
gpHListGrid.fetchData(gpHeaderCriteria);
// Returns -1!
int index = gpHListGrid.getRecordIndex(selGHRecord);
...
}
Where is the error? Thanks in advance =)
I´m using smartgwtee 2.2, Mac, Safari. I have the following problem:
I have two ListGrids (LG A and B). After clicking on a RecordListGrid in LG B, I want to display and select the same Record but in LG A. After calling the method LG A.getRecordIndex(record), the result is -1.
(I suspect that LG A does not recognize the selected ListGridRecord from LG)
code:
// In Event / DoubleClickHandler, retrieve the selected record (After double click!)
public void onDoubleClick(DoubleClickEvent aEvent) {
Object source = aEvent.getSource();
if(source != null && source instanceof ListGrid){
ListGridRecord selGHRecord = ((ListGrid)source).getSelectedRecord();
if(selGHRecord != null){
mainWindow.setGHSearchResult(selGHRecord);
}
}
}
// Called method in main class
public void setGHSearchResult(ListGridRecord selGHRecord){
...
// Display GH in ListGrid (works fine!)
Criteria gpHeaderCriteria = new Criteria();
gpHeaderCriteria.addCriteria("fkbhid", new Integer(1));
gpHListGrid.fetchData(gpHeaderCriteria);
// Returns -1!
int index = gpHListGrid.getRecordIndex(selGHRecord);
...
}
Where is the error? Thanks in advance =)
Comment