So essentially this project builds a portal of testing results from various test types. The fetching and display of results is fine; however, the resulting tables are not being displayed in the correct order. The order they're displayed in is random, but it's clearly specified the order in which the RPC calls are dispatched and I even implemented an indexing system in my panel to further assist.
Basically, the application consists of three horizontal panels contained within a verticalpanel.
further explanation: new, mid, and old refer to three versions of the software product being tested. A TestTable is just a custom FlexTable, and each of the xxxPanels are HorizontalPanels. The indices are all initialized at zero outside of the onModuleLoad() method. Each panel has its own service tasked with dispatching RPC calls to populate the corresponding panel.
public void onSuccess(List<TestResult> result) {
TestTable testTable1 = new TestTable(result);
if(result.get(0).getVrmf().equals(newestVersion)){
newPanels.insert(testTable1, newIndex + 1); //insert adds element BEFORE specified index, so +1
newPanels.addStyleName("horizontalPanelStyle");
newIndex++;
}
if(result.get(0).getVrmf().equals(middleVersion)){
midPanels.insert(testTable1, midIndex + 1); //insert adds element BEFORE specified index, so +1
midPanels.addStyleName("horizontalPanelStyle");
midIndex++;
}
if(result.get(0).getVrmf().equals(oldVersion)){
oldPanels.insert(testTable1, oldIndex + 1); //insert adds element BEFORE specified index, so +1
oldPanels.addStyleName("horizontalPanelStyle");
oldIndex++;
}
}
};
and here is how my calls are dispatched:
if(testPortalSvcNew != null){
testPortalSvcNew.getTestResults(5, newestVersion, TestType.SMOKE, callback);
testPortalSvcNew.getTestResults(5, newestVersion, TestType.BVTUNIX, callback);
testPortalSvcNew.getTestResults(5, newestVersion, TestType.BVTWINDOWS, callback);
}
Every refresh generates a potentially different horizontal display order of test types. Versions are grouped properly and separated vertically, but their horizontal ordering is screwy. I'm stumped!