Hi,
Is it supported to set the theme once onModuleLoad() is reached?
In our application we load the latest user settings in onModuleLoad and would like to set the theme once that info is loaded (but still before any UI components are created).
The loadSkin of the theme uses Page.loadStyleSheet in ISC_Core.js, which has a branch in the code that is hit when Page.isLoaded() is true and isc.FileLoader is present. That branch uses isc.FileLoader.loadCSSFile(...) but the loadCSSFile is undefined causing an exception (see attachment).
Test case:
Stacktrace:
Tested using latest v12.1p and version v14.1p_2026-03-25/Pro Deployment (2026-03-25).
Using the latest version of the Chrome browser.
Is it supported to set the theme once onModuleLoad() is reached?
In our application we load the latest user settings in onModuleLoad and would like to set the theme once that info is loaded (but still before any UI components are created).
The loadSkin of the theme uses Page.loadStyleSheet in ISC_Core.js, which has a branch in the code that is hit when Page.isLoaded() is true and isc.FileLoader is present. That branch uses isc.FileLoader.loadCSSFile(...) but the loadCSSFile is undefined causing an exception (see attachment).
Test case:
Code:
@Override
public void onModuleLoad()
{
loadThemeJs("Graphite");
//UserAccess.load(() -> onUserPreferencesLoaded());
}
private native void loadThemeJs(String themeName) /*-{
var loadScript = $doc.createElement("script");
loadScript.setAttribute("type", "text/javascript");
loadScript.setAttribute("src", "sc/skins/" + themeName + "/load_skin.js");
$doc.body.appendChild(loadScript);
}-*/;
ISC_Core.js:4944 Uncaught TypeError: isc.FileLoader.loadCSSFile is not a function
at _3.isc_c_Page_loadStyleSheet [as loadStyleSheet] (ISC_Core.js:4944:16)
at isc.loadSkin (load_skin.js:22:14)
at load_skin.js:2501:5
at _3.isc_c_Page_loadStyleSheet [as loadStyleSheet] (ISC_Core.js:4944:16)
at isc.loadSkin (load_skin.js:22:14)
at load_skin.js:2501:5
Using the latest version of the Chrome browser.
Comment