How to close all tabs from workArea / refresh browser

Hi,

Can anyone tell me how do you close all open tabs on workArea. In my app there is an object called Project, and in a middle of a project a user can close or open a new one (switch between projects). Is there any method to close all open tabs, re-init the app or any way to refresh completely the browser(which re-init the app by the way…) similar to what NewWindowButtonLoader is doing

Thanks!
Gent

Hi,

First of all, you can use context menu of the main TabSheet, that allows you to close all / close others:

If you want to close all windows programmatically you can use methods of WebWindowManager:


((WebWindowManager) getWindowManager()).closeAllTabbedWindows();
// or
((WebWindowManager) getWindowManager()).closeAllWindows();

Method getWindowManager() is available from any window controller.

tab-menu

Thank you Yuriy!