PDA

View Full Version : JsonView w/LoadMask



brant
15 May 2007, 9:03 AM
It would be nice to have the JsonView support the same loading mask feature as is in the grid.

jsakalos
15 May 2007, 9:07 AM
You can mask view's container and (I think) you can bind it to view's store. I haven't tested this binding but I use container masking quite frequently and it works.

brant
15 May 2007, 11:34 AM
I was requesting it for look and functionality consistency. All I added to the source to get it to work was in the JsonView I added:


loadMask : false,

and in the load function:


if(this.loadMask){ if( this.loadMask.destroy ) { this.loadMask.destroy(); } this.loadMask = new Ext.LoadMask(this.el); }


The only thing I didn't add was a final clean up call to this.loadMask.destroy(); Quick hack.

jsakalos
15 May 2007, 11:53 AM
Yep, I vote for it.

I haven't meant it as you sholdn't want it but as a workaround until it's available. ;)

jack.slocum
15 May 2007, 4:51 PM
JsonView uses an UpdateManager. LoadMask already works with UpdateManager, e.g:

new Ext.LoadMask('your-view-el');

brant
16 May 2007, 8:38 AM
So how about on a View? I tried new Ext.LoadMask(myView) where myView = new Ext.View(....). And it doesn't seem to work.

jack.slocum
16 May 2007, 4:53 PM
new Ext.LoadMask('your-view-el');

That could also be myView.el if you don't know your View's id:

new Ext.LoadMask(myView.el);