TOMMYZHANG
11 Sep 2009, 11:06 PM
public class Gwt_test2 implements EntryPoint {
public void onModuleLoad() {
final ContentPanel aC =new ContentPanel();
GreetingServiceAsync.Util.getInstance().getTransLastDay(new AsyncCallback<dataUtil>(){
@Override
public void onFailure(Throwable caught) {
com.google.gwt.user.client.Window.alert("dfdf");
}
@Override
public void onSuccess(dataUtil result) {
aC.add(new Button("dsfsdf"));
}});
RootPanel.get().add(aC);
}
}
this is my code example.i want to add a button in the onseccess() method to cp(a contentpanel which difined in onModuleLoad()method ),but it didnot work .the widget button had not appeared in contentpanel cp.
so how can i do if i want be add a widget to cp?
thanks!
tommy
public void onModuleLoad() {
final ContentPanel aC =new ContentPanel();
GreetingServiceAsync.Util.getInstance().getTransLastDay(new AsyncCallback<dataUtil>(){
@Override
public void onFailure(Throwable caught) {
com.google.gwt.user.client.Window.alert("dfdf");
}
@Override
public void onSuccess(dataUtil result) {
aC.add(new Button("dsfsdf"));
}});
RootPanel.get().add(aC);
}
}
this is my code example.i want to add a button in the onseccess() method to cp(a contentpanel which difined in onModuleLoad()method ),but it didnot work .the widget button had not appeared in contentpanel cp.
so how can i do if i want be add a widget to cp?
thanks!
tommy