Search in sources :

Example 41 with Bindable

use of org.pentaho.ui.xul.stereotype.Bindable in project pentaho-platform by pentaho.

the class MantleModel method openKettleStatusPage.

@Bindable
public void openKettleStatusPage() {
    OpenKettleStatusCommand cmd = new OpenKettleStatusCommand();
    cmd.execute();
}
Also used : OpenKettleStatusCommand(org.pentaho.mantle.client.commands.OpenKettleStatusCommand) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Example 42 with Bindable

use of org.pentaho.ui.xul.stereotype.Bindable in project pentaho-platform by pentaho.

the class MantleModel method loadAdminContent.

@Bindable
public void loadAdminContent(final String securityPanelId, final String url) {
    // hijack content area (or simply find and select existing content)
    Frame frame = null;
    for (int i = 0; i < MantleXul.getInstance().getAdminContentDeck().getWidgetCount(); i++) {
        Widget w = MantleXul.getInstance().getAdminContentDeck().getWidget(i);
        if (w instanceof Frame && securityPanelId.equals(w.getElement().getId())) {
            frame = (Frame) w;
        }
    }
    if (frame == null) {
        frame = new Frame(url);
        frame.getElement().setId(securityPanelId);
        frame.getElement().setAttribute("frameBorder", "0");
        frame.getElement().setAttribute("allowTransparency", "true");
        MantleXul.getInstance().getAdminContentDeck().add(frame);
    }
    MantleXul.getInstance().getAdminContentDeck().showWidget(MantleXul.getInstance().getAdminContentDeck().getWidgetIndex(frame));
}
Also used : Frame(com.google.gwt.user.client.ui.Frame) Widget(com.google.gwt.user.client.ui.Widget) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Example 43 with Bindable

use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.

the class EmbeddedWizard method showModelEditor.

@Bindable
public void showModelEditor() {
    // open up the modeler
    final DialogListener<Domain> listener = new DialogListener<Domain>() {

        public void onDialogCancel() {
            EmbeddedWizard.this.onDialogAccept();
            wizardController.resetSelectedDatasource();
        }

        public void onDialogAccept(final Domain domain) {
            EmbeddedWizard.this.onDialogAccept();
            wizardController.resetSelectedDatasource();
        }

        public void onDialogReady() {
        }

        @Override
        public void onDialogError(String errorMessage) {
            wizardController.resetSelectedDatasource();
        }
    };
    final String domainId = summary.getDomain().getId();
    final EmbeddedWizard wizard = this;
    // reload model for synchronize between GWT model and backend model http://jira.pentaho.com/browse/BISERVER-10399
    GwtModelerServiceImpl ssd = new GwtModelerServiceImpl();
    ssd.loadDomain(domainId, new XulServiceCallback<Domain>() {

        @Override
        public void error(String arg0, Throwable arg1) {
            // js console log
            arg1.printStackTrace();
            wizardController.resetSelectedDatasource();
            MessageHandler.getInstance().closeWaitingDialog();
            // user error dialog
            MessageHandler.getInstance().showErrorDialog(// $NON-NLS-1$
            datasourceMessages.getString("DatasourceEditor.ERROR"), // $NON-NLS-1$ );
            datasourceMessages.getString("DatasourceEditor.ERROR_0002_UNABLE_TO_SHOW_DIALOG", arg1.getLocalizedMessage()));
        }

        @Override
        public void success(Domain arg0) {
            summary.setDomain(arg0);
            final Domain domain = summary.getDomain();
            ModelerDialog.getInstance(wizard, new AsyncConstructorListener<ModelerDialog>() {

                public void asyncConstructorDone(ModelerDialog dialog) {
                    dialog.addDialogListener(listener);
                    MessageHandler.getInstance().closeWaitingDialog();
                    dialog.showDialog(domain);
                }
            });
        }
    });
}
Also used : GwtModelerServiceImpl(org.pentaho.agilebi.modeler.services.impl.GwtModelerServiceImpl) ModelerDialog(org.pentaho.platform.dataaccess.datasource.modeler.ModelerDialog) Domain(org.pentaho.metadata.model.Domain) AsyncConstructorListener(org.pentaho.ui.xul.gwt.util.AsyncConstructorListener) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Example 44 with Bindable

use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.

the class MessageHandler method showDetailedSuccessDialog.

@Bindable
public void showDetailedSuccessDialog(String message, String detailMessage) {
    XulDialog detailedSuccessDialog = (XulDialog) document.getElementById("successDetailsDialog");
    XulLabel successLabel = (XulLabel) document.getElementById("success_details_label");
    successLabel.setValue(message);
    XulTextbox detailMessageBox = (XulTextbox) document.getElementById("success_dialog_details");
    detailMessageBox.setValue(detailMessage);
    detailedSuccessDialog.show();
}
Also used : XulTextbox(org.pentaho.ui.xul.components.XulTextbox) XulDialog(org.pentaho.ui.xul.containers.XulDialog) XulLabel(org.pentaho.ui.xul.components.XulLabel) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Example 45 with Bindable

use of org.pentaho.ui.xul.stereotype.Bindable in project data-access by pentaho.

the class WizardConnectionController method showAddConnectionDialog.

@Bindable
public void showAddConnectionDialog() {
    datasourceModel.setEditing(false);
    if (databaseDialog != null) {
        previousConnectionName = null;
        existingConnectionName = previousConnectionName;
        databaseDialog.setDatabaseConnection(null);
        databaseDialog.show();
    } else {
        databaseDialog = new GwtDatabaseDialog(databaseTypeHelper, GWT.getModuleBaseURL() + "dataaccess-databasedialog.xul", // $NON-NLS-1$
        connectionSetter);
    }
}
Also used : GwtDatabaseDialog(org.pentaho.ui.database.gwt.GwtDatabaseDialog) Bindable(org.pentaho.ui.xul.stereotype.Bindable)

Aggregations

Bindable (org.pentaho.ui.xul.stereotype.Bindable)71 Request (com.google.gwt.http.client.Request)15 RequestBuilder (com.google.gwt.http.client.RequestBuilder)15 RequestCallback (com.google.gwt.http.client.RequestCallback)15 RequestException (com.google.gwt.http.client.RequestException)15 Response (com.google.gwt.http.client.Response)15 IDatabaseConnection (org.pentaho.database.model.IDatabaseConnection)15 ArrayList (java.util.ArrayList)10 List (java.util.List)7 OpenFileCommand (org.pentaho.mantle.client.commands.OpenFileCommand)5 IDatasourceInfo (org.pentaho.platform.dataaccess.datasource.IDatasourceInfo)5 XulHbox (org.pentaho.ui.xul.containers.XulHbox)4 SaveCommand (org.pentaho.mantle.client.commands.SaveCommand)3 XulComponent (org.pentaho.ui.xul.XulComponent)3 XulException (org.pentaho.ui.xul.XulException)3 XulLabel (org.pentaho.ui.xul.components.XulLabel)3 IDatabaseType (org.pentaho.database.model.IDatabaseType)2 DatabaseTypeHelper (org.pentaho.database.util.DatabaseTypeHelper)2 FilePropertiesCommand (org.pentaho.mantle.client.commands.FilePropertiesCommand)2 NewDropdownCommand (org.pentaho.mantle.client.commands.NewDropdownCommand)2