Is there a event/callback that occurs when a canvas is drawn?
Some background information on why I want this: I have a TabSet and when one of the tabs is clicked for the first time, I want to perform a RPCManager request that in its callback methods creates a cube grid. This grid has a lot of facets and this leads to Unresponsive Script errors in Internet Explorer. I was hoping I could work around this problem by only creating that RPC request when the user clicks on a certain tab (I now create the call immediately when creating the whole site).
Is a ViewLoader something I would need to use?
I think I’ve found it, please confirm…
I think I just had a “a-ha” moment…
I have overwritten the draw() method of one of my widgets, called my code and finished with a this.Super(‘draw’, arguments) call.
Is this the way to go?
To lazily create the contents of a tab, use the tabSelected event and call updatePane.
In general, for a very large cube, the way to avoid a “script running slowly” dialog is to avoid showing too much information on initial draw. The user can’t actually see 50,000 cells at once anyway, so use tree facets to have less relevant data initially collapsed. This is both faster and a better user experience.
Yep, you’re right and there was a good reason for me to do this: in a data source driven cube, I can’t use the hideEmptyFacets option. I have a tree of companies and each company has departments, but these departments are company specific. I could start the cube with only the companies visible and some totals for them. It would be nice if I could “grab” the open leaf-event of a company and then load all departments for it. But:
- the company isn’t a leaf since it has no children
- I don’t think I can use this behavior in combination with the hideEmptyFacets requirement.
I know it’s quite unclear from what I describe above, but I hope you still understand. If not, let me know and I will try to rephrase myself.
This thread is related to earlier threads I started:
http://forums.smartclient.com/showthread.php?t=10288
http://forums.smartclient.com/showthread.php?t=10208