Hello,
I would like to display a tree menu containing submenus, for that I use an IPickTreeItem.
https://www.smartclient.com/smartgwt...kTreeItem.html
I have an issue with this class because it seems that it only load the content on first click.
Environment : SmartGWT 12 & GWT 2.8.2
When I click on the list for the first time the content is partially displayed :
The content is fully loaded when I loose the focus of the menu and after clicking back a second time :
Here is the code :
From what I know for sure is that the DataSource is fully retrieved before the IPickTreeItem is displayed.
I replaced IPickTreeItem with a simple Menu class instead of IPickTreeItem with the exact same DataSource and all the content was avalaible when I first clicked on it.
Changing setLoadDataOnDemand to true does not resolve the problem plus every children of the list will be considered as submenus :
https://www.smartclient.com/smartgwt....lang.Boolean-
Any help will be appreciated
Kind regards
I would like to display a tree menu containing submenus, for that I use an IPickTreeItem.
https://www.smartclient.com/smartgwt...kTreeItem.html
I have an issue with this class because it seems that it only load the content on first click.
Environment : SmartGWT 12 & GWT 2.8.2
When I click on the list for the first time the content is partially displayed :
The content is fully loaded when I loose the focus of the menu and after clicking back a second time :
Here is the code :
private final IPickTreeItem subjectSelect = new IPickTreeItem(); SujetsTableXmlDS instance = SujetsTableXmlDS.getInstance(); instance.fetchData(null, new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { logger.log(Level.INFO, "execute(DSResponse " + response + ", Object " + rawData + ", DSRequest " + request + ")"); } }); this.subjectSelect.setTitle("Sujet"); this.subjectSelect.setWidth(210); this.subjectSelect.setTitleAlign(Alignment.LEFT); this.subjectSelect.setTextBoxStyle("ClientAreaStaticFieldLabel"); this.subjectSelect.setTitleStyle("ClientAreaFieldTitle"); this.subjectSelect.setDisplayField(SujetsTable.COL_LABEL); this.subjectSelect.setValueField(SujetsTable.COL_NOMCOMPLET); this.subjectSelect.setDataSource(instance); this.subjectSelect.setCanSelectParentItems(false); this.subjectSelect.setLoadDataOnDemand(false); hLayout1.addMember(this.getForm(this.subjectSelect, 48, 0, 2, true)); |
From what I know for sure is that the DataSource is fully retrieved before the IPickTreeItem is displayed.
I replaced IPickTreeItem with a simple Menu class instead of IPickTreeItem with the exact same DataSource and all the content was avalaible when I first clicked on it.
Changing setLoadDataOnDemand to true does not resolve the problem plus every children of the list will be considered as submenus :
https://www.smartclient.com/smartgwt....lang.Boolean-
Any help will be appreciated
Kind regards
Comment