[richfaces-svn-commits] JBoss Rich Faces SVN: r1286 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Jun 25 05:39:06 EDT 2007
Author: dmorozov
Date: 2007-06-25 05:39:06 -0400 (Mon, 25 Jun 2007)
New Revision: 1286
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Suspend some initialization code by timeout
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 08:03:54 UTC (rev 1285)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 09:39:06 UTC (rev 1286)
@@ -51,17 +51,22 @@
if(!this.isInitialized) {
this.isInitialized = true;
- ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
- var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
- this.setProgressCtrl(progress);
- Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
- if (this.options.selectionInput) {
- this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
+ ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
+
+ // suspend some processing
+ setTimeout(function(){
+ var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
+ this.setProgressCtrl(progress);
+ Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
+ if (this.options.selectionInput) {
+ this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
+ }
+ }.bind(this), 500);
+
+ if (this.startUpTime) {
+ ClientUILib.log(ClientUILogger.ERROR, "Load Time'" + (new Date().getTime() - this.startUpTime) + "' ms");
+ }
}
- if (this.startUpTime) {
- ClientUILib.log(ClientUILogger.ERROR, "Load Time'" + (new Date().getTime() - this.startUpTime) + "' ms");
- }
- }
},
onSortComplete : function(request, event, data){
@@ -106,10 +111,10 @@
},
setSizes: function(width, height) {
- var style = this.element.style;
- style.width = width +"px";
- style.height = height +"px";
- this.updateLayout();
+ var style = this.element.style;
+ style.width = width +"px";
+ style.height = height +"px";
+ this.updateLayout();
},
doExpand: function(index) {
More information about the richfaces-svn-commits
mailing list