TreeGrid - Display loading message when folder is opened

Hello,

I use a TreeGrid with loading on demand. How can I display a loading message or loading icon when the user opens a folder and waits for the new data? Is there a built-in way to do this? Or do I have to construct this feature on my own?

The default behavior already displays a loading message in a small pop-up dialog. See rpcRequest.promptStyle.

Hello Isomorphic,

thanks for your quick reply. For some reason, my TreeGrid does not display a loading message. Does this only apply for DataSource types where SmartGWT automatically dispatches a server call? I’m using a custom DataSource (RPC), thus initiating the call myself.

Using the GwtRpcDataSource with dataProtocol:“clientCustom” circumvents SmartGwt’s RPCManager so no prompt is shown. You’ll have to handle showing a loading message and handling modality / blocking operations yourself if you choose this path.

in this case I recommend the ModalWindow from the smartgwt extensions project, you can mask the entire tree/window showing a loading icon with a message…

From here you look at the class file and an example: http://code.google.com/p/smartgwt-extensions/source/browse/#svn/trunk/src/main/java/com/smartgwt/extensions/client/modal

Thanks for your advice, Isomorphic and mihai007.

Mihai007: Thank you very much for your hint. I will look into it, it sounds very interesting!