Package com.mvc4g.client

Examples of com.mvc4g.client.Event


  public void onModuleLoad2()
  {
    Controller mainController = new com.mvc4g.client.Controller();
    mainController.addAction("login", new LoginAction());
    mainController.addView("loginView", new LoginView());
    mainController.handleEvent(new Event("login", null));   
  }
View Full Code Here


      if(deploymentId!=null)             
        view.select(deploymentId);

      // refresh process definitions
      controller.handleEvent(
          new Event(UpdateDefinitionsAction.ID, null)
      );
    }
  }
View Full Code Here

  public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
  {
    // refresh view
    controller.handleEvent(
        new Event(UpdateDeploymentsAction.ID, null)
    );
  }
View Full Code Here

      toolBar.add(
          new ToolButton("Refresh", new ClickListener() {
            public void onClick(Widget sender) {
              // force loading
              controller.handleEvent(
                  new Event(UpdateJobsAction.ID, null)
              );
            }
          }
          )
      );

      toolBar.addSeparator();

      toolBar.add(
          new ToolButton("Execute", new ClickListener() {
            public void onClick(Widget sender) {
              JobRef selection = getSelection();
              if(null==selection)
              {
                MessageBox.alert("Missing selection", "Please select a job!");
              }
              else
              {
                controller.handleEvent(
                    new Event(ExecuteJobAction.ID, selection.getId())
                );
              }
            }
          }
          )
View Full Code Here

            {
              String reportUrl = URLBuilder.getInstance().getProcessSummaryReportUrl(procDefId);

              // load report
              controller.handleEvent(
                  new Event(RenderReportAction.ID,
                      new RenderDispatchEvent(
                          ReportView.ID, reportUrl
                      )
                  )
              );
            }

            public String getActionName()
            {
              return "Open report";
            }
          }
      );


      // report frame
      frame = new Frame();
      DOM.setStyleAttribute(frame.getElement(), "border", "none");

      // toolbar
      final LayoutPanel toolBox = new LayoutPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);
      //toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));

      final ToolBar toolBar = new ToolBar();
      toolBar.add(createMenuBtn());
      toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));

      // loading panel
      loadingPanel = new LayoutPanel();
      loadingPanel.add(new Label("Loading, please wait..."));
      loadingPanel.setVisible(false);

      // assembly
      layout.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
      layout.add(loadingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
      layout.add(frame, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));

      this.add(layout);

      // views and actions
      controller.addView(
          "report.definition.search", search
      );

      controller.addAction(UpdateSearchDefinitionsAction.ID, new UpdateSearchDefinitionsAction());
      controller.addAction(RenderReportAction.ID, new RenderReportAction());

      // initial report
      controller.handleEvent(
          new Event(RenderReportAction.ID,
              new RenderDispatchEvent(
                  ReportView.ID, URLBuilder.getInstance().getOverallReportUrl()
              )
          )
      );
View Full Code Here

      {
        SearchWindow sw = new SearchWindow("Open process summary report", search);
        sw.center();

        controller.handleEvent(
            new Event(
                UpdateSearchDefinitionsAction.ID,
                "report.definition.search"
            )
        );
View Full Code Here

  {
    final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
   
    // force reload instance list
    controller.handleEvent(
        new Event(UpdateInstancesAction.ID, def)
    );
  }
View Full Code Here

  public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
  {
    // refresh view
    controller.handleEvent(
        new Event(UpdateDeploymentsAction.ID, null)
    );
  }
View Full Code Here

  public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
  {
    // refresh view
    controller.handleEvent(
        new Event(UpdateDeploymentsAction.ID, null)
    );
  }
View Full Code Here

              ProcessInstanceRef selection = getCurrentInstance();
              if(selection!=null)
              {
                createDiagramWindow(selection);
                controller.handleEvent(
                    new Event(LoadActivityDiagramAction.ID, selection)
                );
              }
            }
            else
            {
              MessageBox.alert("Incomplete deployment", "No diagram associated with process");             
            }

          }
        }
    );

    diagramBtn.setEnabled(false);
    buttonPanel.add(diagramBtn);

    instanceDataBtn = new Button("Instance Data",
        new ClickListener()
        {
          public void onClick(Widget widget)
          {
            if(currentInstance!=null)
            {
              createDataWindow(currentInstance);
              controller.handleEvent(
                  new Event(UpdateInstanceDataAction.ID, currentInstance.getId())
              );
            }
          }
        }
    );
View Full Code Here

TOP

Related Classes of com.mvc4g.client.Event

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.