package org.gcube.portlets.user.td.rulewidget.client; import org.gcube.portlets.user.td.expressionwidget.client.utils.UtilsGXT3; import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; import org.gcube.portlets.user.td.gwtservice.shared.user.UserInfo; import com.allen_sauer.gwt.log.client.Log; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.rpc.AsyncCallback; /** * * @author "Giancarlo Panichi" g.panichi@isti.cnr.it * */ public class RuleWidgetEntry implements EntryPoint { public void onModuleLoad() { callHello(); } protected void test() { // EventBus eventBus= new SimpleEventBus(); // TRId trId=new TRId("86",TabResourceType.STANDARD, "1159"); /* * RemoveColumnDialog dialog=new RemoveColumnDialog(trId); * dialog.show(); ChangeToAnnotationColumnDialog changeToAnnotation=new * ChangeToAnnotationColumnDialog(trId); changeToAnnotation.show(); */ /* * ChangeColumnTypeDialog changeColumnType=new * ChangeColumnTypeDialog(trId,eventBus); changeColumnType.show(); */ /* * ChangeColumnTypeProgressDialog c=new * ChangeColumnTypeProgressDialog(eventBus); * c.addProgressDialogListener(changeColumnType); c.show(); */ /* * DialogCodelistSelection dcs=new DialogCodelistSelection(); * dcs.show(); */ Log.info("Hello!"); } protected void callHello() { TDGWTServiceAsync.INSTANCE.hello(new AsyncCallback() { @Override public void onFailure(Throwable caught) { Log.info("No valid user found: " + caught.getMessage()); caught.printStackTrace(); if (caught instanceof TDGWTSessionExpiredException) { UtilsGXT3.alert("Error", "Expired Session"); } else { UtilsGXT3.alert("Error", "No user found"); } } @Override public void onSuccess(UserInfo result) { Log.info("Hello: " + result.getUsername()); test(); } }); } }