I am using a DBTreeview Webcomponent [servoyextra-dbtreeview] for the application menus for NG1 and NG2. By default, there is an icon and a (menu) name shown.
There is an application wide menu to toggle between hiding and showing the above mentioned menu without or with icon.
This is done be following code:
if (scopes.domConfiguration.isIconHidden) {
elements.domMenu.setImageURLDataprovider(controller.getDataSource(), 'no_icon_url');
scopes.domConfiguration.isIconHidden = true;
}
else {
elements.domMenu.setImageURLDataprovider(controller.getDataSource(), 'icon_url'); // Points to an image like 'absenzen.png' in Media node.
scopes.domConfiguration.isIconHidden = false;
}
elements.domMenu.refresh();
In the menus table, where the DBTreeview is based on, there are 2 columns, one containing a transparent 1 x 16px transparent PNG image for the no_icon_url, the other one containing the icons. The icon images are stored in the Media node as PNG images.
The first level of the menus, like SEMESTERPLANUNG or PENSEN, have the 1 x 16px PNG assigned.
Hiding the icons works perfectly, showing it again shows the icons BUT for the first level menus it shows the default (yellow) icon instead of the 1 x 16px transparent icon. Refreshing the Browser corrects this, i. e. the transparent icon is shown and the menus look like in the first image.
See the images below.
My conclusion is, there is a refresh missing which I can not do programmatically, or at least I don’t know how. Tried application.updateUI(), …
Any idea