|
#1
|
|||
|
|||
|
It would be nice to have a feature for showing a progress screen and load scripts and/or other resources assynchronous on the fly.
Script resources could also be automatically appended to the document. The idea is that all the resources including isomorphic API could be loaded before the application starts and the progress shown to the user. Something like this: Code:
<html>
<head>
<script src="./isomorphic/system/modules/ISC_ResourceLoader.js"></script>
<script>
window.onload = function()
{
var loader = isc.ResourceLoader.create
({
showLoadingScreen : true,
autoInstallScripts : true,
resources :
[
{ name : "license" url : "./license.txt", type : "plain_text"},
{ name : "isomorphic_core", url : "./isomorphic/system/modules/ISC_Core.js", type : "script"},
{ name : "validator", url : "./scripts/my_custom_validation.js", type : "script"}
]
resourceLodaded : function (name, url, type, data, totalProgress)
{
if (name == "license")
confirm(data);
},
onComplete : function()
{
isc.Window.create
({
width : 200, height : 150, autoCenter : true,
items :
[
isc.Label.create({contents : "All files were loaded correctly!"});
]
});
},
onError : function(name, url, type, errorCode)
{
if ((errorCode == 404) && (name == "isomorphic_core"))
{
alert("The isomorphic core API wasn't found! You can continue using this application but some features will not be available!");
}
}
});
loader.start();
}
</script>
</head>
<body>
</body>
</html>
|
|
#2
|
|||
|
|||
|
See FileLoader for SmartClient, and the .html file for loading the SmartGWT Showcase (which is a straight-to-the-browser progress indicator implementation).
|
|
#3
|
|||
|
|||
|
Thank you!
I'll take a look! |
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Launching Visual Builder in samples | RevMen | Smart GWT Technical Q&A | 10 | 9th Sep 2011 10:05 |
| Loading prompt of grid: modalmask on loading grid, center of prompt | martintaal | Technical Q&A | 9 | 20th May 2011 05:58 |
| ISC Feature Explorer: Sample "Mass Update" works in place; but NOT standalone | SchlauKunde | Technical Q&A | 3 | 15th Apr 2011 16:53 |
| loading indicator at the startup of ShowCase | jasonzhang2002 | Smart GWT Technical Q&A | 5 | 29th May 2009 21:03 |
| partial js loading | catkeeper | Smart GWT Technical Q&A | 1 | 11th Jan 2009 05:47 |