PDA

View Full Version : Turnoff loadMask when a data operation is occurring?



Bucs
13 Mar 2011, 7:39 AM
This one is driving me nuts. I have a Panel component in a card layout. The Panel has a DataView that is configured with a Store which has a configured proxy to read the necessary data, and autoLoad is set to true. I am also using paging on the the store so I call store.nextPage() and store .previousPage() as well when working with the panel. During these data operations, I am getting a default animated "Loading" mask that I want to turn off b/c I have my own loading component that is being displayed that works better from a creative standpoint. Where the sam-hell is that default loadMask defined? On the store, the proxy, the panel? And how can I turn it off?

Thanks!

powellke
14 Mar 2011, 8:09 AM
Just set the DataView's loadingText config option to undefined.

Bucs
14 Mar 2011, 8:28 AM
Thanks for that...not sure why that works since the docs say that it defaults to undefined and therefore it should not be showing the mask...but it does. If you manually set property to null on the dataview, it will suppress the load mask, so thanks for that.

I passed over this since I took the API at face value...guess I should have looked harder at this :)

Thanks!

powellke
14 Mar 2011, 8:36 AM
The docs are definitely wrong here. The source code for DataView has this:

loadingText: 'Loading...',

I find myself looking at their source code much more with Touch than I ever did with ExtJS.

Bucs
14 Mar 2011, 8:39 AM
Agreed, I need to look at the source more as well...however, in this case I didn't know exactly where to look :) For some reason, I was assuming this was on the store/proxy/reader somehow. Should have know better!