开发者

How to handle multiple LoadMask in Extjs?

I'm doin开发者_高级运维g multi-load in one Window (form load and grid data).

This is my logic,

  1. Start with do mask when Window open.
  2. Add mask-counter in form load and grid load callback.
  3. When mask-counter equal 2, unmask.

Do you have better idea ?

Thanks.


you can also use this logic:

form.beforeLoad( form.loading = true, if ( not grid.loading ) mask )
grid.beforeLoad( grid.loading = true, if ( not form.loading ) mask )

form.onLoad( form.loading = false, if ( not grid.loading ) unmask )
grid.onLoad( grid.loading = false, if ( not form.loading ) unmask )

this will sync loaders.

by the way, you can also use Ext.Msg.wait, that'll bring a modal dialog without any buttons and wait until you call hide event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜