Package com.mvc4g.client

Examples of com.mvc4g.client.Event


                public void onResult(boolean doIt)
                {
                  if(doIt)
                  {
                    controller.handleEvent(
                        new Event(
                            SuspendDeploymentAction.ID,
                            getSelection().getId()
                        )
                    );
                  }
                }
              });
        }
        else
        {
          MessageBox.alert("Missing selection", "Please select a deployment");
        }
      }
    }
    );

    resumeBtn =  new Button("Activate", new ClickHandler() {
      public void onClick(ClickEvent clickEvent)
      {       
        DeploymentRef deploymentRef = getSelection();
        if(deploymentRef!=null)
        {
          MessageBox.confirm("Activate deployment",
              "Do you want to resume this deployment?",
              new MessageBox.ConfirmationCallback() {
                public void onResult(boolean doIt)
                {
                  if(doIt)
                  {
                    controller.handleEvent(
                        new Event(
                            ResumeDeploymentAction.ID,
                            getSelection().getId()
                        )
                    );
                  }
View Full Code Here


 
                                  DeferredCommand.addCommand(new Command()
                                  {
                                      public void execute() {
                                          controller.handleEvent(
                                                  new Event(LoadInstanceActivityImage.class.getName(), selection)
                                          );
                                      }
                                  }
                                  );
 
                              }
                          }
                          else
                          {
                              MessageBox.alert("Incomplete deployment", "No diagram associated with process");
                          }
                      }
                  }
          );
        } else if(isjBPMInstance) {
          diagramBtn = new Button("Diagram",
                  new ClickHandler()
                  {
                    public void onClick(ClickEvent clickEvent)
                    {
                      String diagramUrl = getCurrentDefintion().getDiagramUrl();
                      if(diagramUrl !=null && !diagramUrl.equals(""))
                      {
                        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.setVisible(!isRiftsawInstance);
        }
        diagramBtn.setEnabled(false);
        buttonPanel.add(diagramBtn, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
        instanceDataBtn = new Button("Instance Data",
                new ClickHandler()
                {
                    public void onClick(ClickEvent clickEvent)
                    {
                        if(currentInstance!=null)
                        {
                            createDataWindow(currentInstance);
                            controller.handleEvent(
                                    new Event(UpdateInstanceDataAction.ID, currentInstance.getId())
                            );
                        }
                    }
                }
        );
View Full Code Here

        diagramWindowPanel = new WidgetWindowPanel(
                "Process Instance Activity",
                layout, true
        );

        controller.handleEvent(new Event(GetProcessInstanceEventsAction.ID, inst.getId()));
        } else if(isjBPMInstance) {
          MosaicPanel layout = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
            layout.setStyleName("bpm-window-layout");
            layout.setPadding(5);
View Full Code Here

  public void execute(Controller controller, Object object)
  {
    // assigned tasks
    String currentUser = appContext.getAuthentication().getUsername();
    controller.handleEvent(
        new Event(LoadTasksAction.ID, currentUser)
    );

    // open tasks
    controller.handleEvent(
        new Event(LoadTasksParticipationAction.ID, currentUser)
    );
  }
View Full Code Here

          public void onClick(Widget widget)
          {
            if(selection!=null)
            {
              controller.handleEvent(
                  new Event(AssignTaskAction.ID, new AssignEvent(selection, currentTask))
              );
            }           
          }
        }
    );
View Full Code Here

            {
              TaskRef task = getSelection(); // first call always null?
              if(task!=null)
              {
                controller.handleEvent(
                    new Event(UpdateDetailsAction.ID, new DetailViewEvent("AssignedDetailView", task))
                );
              }

            }
          }
      );

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

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new Button("Refresh", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              reload();

            }
          }
          )
      );


      Button viewBtn = new Button("View", new ClickHandler()
      {

        public void onClick(ClickEvent clickEvent)
        {
          TaskRef selection = getSelection();

          if (selection != null)
          {
            if (selection.getUrl() != null && !selection.getUrl().equals(""))
            {
              iframeWindow = new IFrameWindowPanel(
                  selection.getUrl(), "Task Form: "+selection.getName()
              );

              iframeWindow.setCallback(
                  new IFrameWindowCallback()
                  {
                    public void onWindowClosed()
                    {
                      reload();
                    }
                  }
              );

              iframeWindow.show();
            }
            else
            {
              MessageBox.alert("Invalid operation", "The task doesn't provide a UI");
            }
          }
          else
          {
            MessageBox.alert("Missing selection", "Please select a task");
          }
        }
      }
      );
      toolBar.add(viewBtn);

      toolBar.add(
          new Button("Release", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              TaskRef selection = getSelection();

              if(selection!=null)
              {
                TaskIdentityEvent payload = new TaskIdentityEvent(
                    null, selection
                );

                controller.handleEvent(
                    new Event(ReleaseTaskAction.ID, payload)
                );
              }
              else
              {
                MessageBox.alert("Missing selection", "Please select a task");
View Full Code Here

  private void reload()
  {
    // force loading
    controller.handleEvent(
        new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
    );
  }
View Full Code Here

    model.clear();

     // clear details
    controller.handleEvent(
        new Event(UpdateDetailsAction.ID, new DetailViewEvent("AssignedDetailView", null))
    );
  }
View Full Code Here

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

  public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
  {
    // force refresh reload
    controller.handleEvent(
        new Event(ReloadAllTaskListsAction.ID, null)
    );
  }
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.