|
|
|
@ -119,6 +119,7 @@ import com.extjs.gxt.ui.client.widget.Info;
|
|
|
|
|
import com.google.gwt.core.client.GWT;
|
|
|
|
|
import com.google.gwt.event.shared.EventHandler;
|
|
|
|
|
import com.google.gwt.event.shared.HandlerManager;
|
|
|
|
|
import com.google.gwt.user.client.Window;
|
|
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
|
|
|
import com.google.gwt.user.client.ui.HasWidgets;
|
|
|
|
|
|
|
|
|
@ -205,23 +206,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|
|
|
|
@Override
|
|
|
|
|
public void onCreateSharedFolder(CreateSharedFolderEvent createSharedFolderEvent) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// rpcWorkspaceService.readFromApplicationProfile("aaa", "bbb", new AsyncCallback<Void>() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onFailure(Throwable caught) {
|
|
|
|
|
// // TODO Auto-generated method stub
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onSuccess(Void result) {
|
|
|
|
|
// // TODO Auto-generated method stub
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final FileModel sourceFileModel = createSharedFolderEvent.getFileSourceModel();
|
|
|
|
|
|
|
|
|
|
//IF ITEM IS SHAREABLE
|
|
|
|
@ -1212,28 +1196,51 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|
|
|
|
// System.out.println("id " +openReportsEvent.getSourceFileModel().getIdentifier());
|
|
|
|
|
// System.out.println("name " +openReportsEvent.getSourceFileModel().getName());
|
|
|
|
|
|
|
|
|
|
rpcWorkspaceService.setValueInSession(ConstantsExplorer.IDREPORT, openReportsEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<Void>() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rpcWorkspaceService.getURLFromApplicationProfile(ConstantsExplorer.IDREPORT, openReportsEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<String>() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
// Log.error("Error setting session attribute idreport",caught);
|
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " setting session attribute idreport", null);
|
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " getting application profile - attribute idreport", null);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess(Void result) {
|
|
|
|
|
String currentUrl = portalURL();
|
|
|
|
|
int last = currentUrl.lastIndexOf("/");
|
|
|
|
|
String reportUrl = currentUrl.substring(0,last+1) + ConstantsExplorer.REPORTGENERATION;
|
|
|
|
|
public void onSuccess(String url) {
|
|
|
|
|
|
|
|
|
|
String reportUrl = url;
|
|
|
|
|
// int last = currentUrl.lastIndexOf("/");
|
|
|
|
|
// String reportUrl = currentUrl.substring(0,last+1) + ConstantsExplorer.REPORTGENERATION;
|
|
|
|
|
// Log.trace("Url: "+reportUrl);
|
|
|
|
|
System.out.println("currentUrl " +currentUrl);
|
|
|
|
|
// System.out.println("currentUrl " +currentUrl);
|
|
|
|
|
System.out.println("reportUrl " +reportUrl);
|
|
|
|
|
new WindowOpenUrl(reportUrl, "_self", "");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// rpcWorkspaceService.setValueInSession(ConstantsExplorer.IDREPORT, openReportsEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<Void>() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onFailure(Throwable caught) {
|
|
|
|
|
// new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " setting session attribute idreport", null);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onSuccess(Void result) {
|
|
|
|
|
// String currentUrl = portalURL();
|
|
|
|
|
// int last = currentUrl.lastIndexOf("/");
|
|
|
|
|
// String reportUrl = currentUrl.substring(0,last+1) + ConstantsExplorer.REPORTGENERATION;
|
|
|
|
|
//// Log.trace("Url: "+reportUrl);
|
|
|
|
|
// System.out.println("currentUrl " +currentUrl);
|
|
|
|
|
// System.out.println("reportUrl " +reportUrl);
|
|
|
|
|
// new WindowOpenUrl(reportUrl, "_self", "");
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void doClickOpenReportTemplate(OpenReportsEvent openReportTemplateEvent) {
|
|
|
|
@ -1242,28 +1249,50 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|
|
|
|
// System.out.println("id " +openReportTemplateEvent.getSourceFileModel().getIdentifier());
|
|
|
|
|
// System.out.println("name " +openReportTemplateEvent.getSourceFileModel().getName());
|
|
|
|
|
|
|
|
|
|
rpcWorkspaceService.setValueInSession(ConstantsExplorer.IDTEMPLATE, openReportTemplateEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<Void>() {
|
|
|
|
|
rpcWorkspaceService.getURLFromApplicationProfile(ConstantsExplorer.IDTEMPLATE, openReportTemplateEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<String>() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
// Log.error("Error setting session attribute idtemplate",caught);
|
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR +" setting session attribute idtemplate", null);
|
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " getting application profile - attribute idreport", null);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess(Void result) {
|
|
|
|
|
String currentUrl = portalURL();
|
|
|
|
|
int last = currentUrl.lastIndexOf("/");
|
|
|
|
|
String templateUrl = currentUrl.substring(0,last+1) + ConstantsExplorer.TEMPLATECREATION;
|
|
|
|
|
public void onSuccess(String url) {
|
|
|
|
|
|
|
|
|
|
String templateUrl = url;
|
|
|
|
|
// int last = currentUrl.lastIndexOf("/");
|
|
|
|
|
// String templateUrl = currentUrl.substring(0,last+1) + ConstantsExplorer.TEMPLATECREATION;
|
|
|
|
|
// Log.trace("Url: "+templateUrl);
|
|
|
|
|
System.out.println("currentUrl " +currentUrl);
|
|
|
|
|
System.out.println("reportUrl " +templateUrl);
|
|
|
|
|
// System.out.println("currentUrl " +currentUrl);
|
|
|
|
|
// System.out.println("reportUrl " +templateUrl);
|
|
|
|
|
new WindowOpenUrl(templateUrl, "_self", "");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// rpcWorkspaceService.setValueInSession(ConstantsExplorer.IDTEMPLATE, openReportTemplateEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<Void>() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onFailure(Throwable caught) {
|
|
|
|
|
//// Log.error("Error setting session attribute idtemplate",caught);
|
|
|
|
|
// new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR +" setting session attribute idtemplate", null);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onSuccess(Void result) {
|
|
|
|
|
// String currentUrl = portalURL();
|
|
|
|
|
// int last = currentUrl.lastIndexOf("/");
|
|
|
|
|
// String templateUrl = currentUrl.substring(0,last+1) + ConstantsExplorer.TEMPLATECREATION;
|
|
|
|
|
//// Log.trace("Url: "+templateUrl);
|
|
|
|
|
// System.out.println("currentUrl " +currentUrl);
|
|
|
|
|
// System.out.println("reportUrl " +templateUrl);
|
|
|
|
|
// new WindowOpenUrl(templateUrl, "_self", "");
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|