Hi Vaibhav,
Thanks to your idea.
I implemented the same. But again the label now is not shown properly.
After few seconds again the page is busy with loading data. And the
entire page is goes off with blank with giving impression that
hanging.. and once the data is loaded I am getiting the Grid visible.
Still I cant prevent the impact of grid data loading while showing the
label.
Here is how I am dealing with it..
[code]
package com.ibsplc.idaho.thinclient.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.*;
public class Thinclient implements EntryPoint{
/**
* This is the entry point method.
*/
Grid flexTable = new Grid(101,87);
final Label img = new Label();
public void onModuleLoad() {
flexTable.setVisible(false);
img.setStyleName("ProgressImage");
RootPanel.get().add(img);
final DBFetchAsync dbFetch = (DBFetchAsync) GWT.create
(DBFetch.class);
ServiceDefTarget endpoint = (ServiceDefTarget) dbFetch;
endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() +
"DBFetch"); // for GWT eclipse launch
AsyncCallback asyncCallback = new AsyncCallback(){
public void onSuccess(Object result) {
try {
//here comes the code for Loading the data into the Grid.......
//after data load is completed
RootPanel.get().remove(img); //removing the Label which has the
Progressbar image
flexTable.setVisible(true); //showin the Grid
RootPanel.get().add(flexTable); //Adding to the Root panel
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
public void onFailure(Throwable caught) {
Window.alert("Failed to get quote " + caught.getMessage());
};
};
flexTable.addStyleName("FlexTable");
try {
dbFetch.setGridDataInfo(asyncCallback);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
}
[/code]
Kindly advise whether its correct way of doing it. And how I can
achieve my requirement?
Thanks
Suren
> faint_grain.jpg
> 1KViewDownload
>
> imstp_animation_monkey_en_020908.gif
> 55KViewDownload- Hide quoted text -
>
> - Show quoted text -