Need to be able to select the associated record in the NavigationPane in a
nested Presenter's onRevel() method.
Which isn't possible id the ListGird hasn't been populated.
// NavigationPaneSectionListGrid
...
// register the Data Arrived Handler
this.addDataArrivedHandler(new DataArrivedHandler() {
@Override
public void onDataArrived(DataArrivedEvent event) {
Log.debug("onDataArrived()");
selectRecord(0);
}
});
// MainPageView
navigationPane.addSectionHeaderClickHandler(new SectionHeaderClickHandler() {
@Override
public void onSectionHeaderClick(SectionHeaderClickEvent event) {
SectionStackSection section = event.getSection();
String name = ((NavigationPaneSection)section).getSelectedRecord();
//
// TO DO: revisit this ???
//
// if there is no selected record e.g. the data hasn't finished loading ...
// see NavigationPaneSectionListGrid -> onDataArrived then name == ""
if (name.isEmpty()) {
Log.debug("name.isEmpty()");
if (section.getTitle().equals(Serendipity.getConstants().SettingsStackSectionName())) {
name = Serendipity.getConstants().AdministrationMenuItemName();
}
else if (section.getTitle().equals(Serendipity.getConstants().ResourceCentreStackSectionName())) {
name = Serendipity.getConstants().HighlightsMenuItemName();
}
}
Log.debug("name = " + name);
if (getUiHandlers() != null) {
getUiHandlers().onNavigationPaneSectionHeaderClicked(name);
}
}
});
Original issue reported on code.google.com by rob.ferg...@gtempaccount.com on 25 Jan 2011 at 10:30
Original issue reported on code.google.com by
rob.ferg...@gtempaccount.com
on 25 Jan 2011 at 10:30