Package org.jboss.bpm.console.client.model

Examples of org.jboss.bpm.console.client.model.TaskRef


    result.setRootToken(token);
    return result;
  }
 
  public static TaskRef task(TaskSummary task) {
    return new TaskRef(
      task.getId(),
      Long.toString(task.getProcessInstanceId()),
      "",
      task.getName(),
      task.getActualOwner() == null ? null : task.getActualOwner().getId(),
View Full Code Here


    for (I18NText text: task.getNames()) {
      if ("en-UK".equals(text.getLanguage())) {
        name = text.getText();
      }
    }
    return new TaskRef(
      task.getId(),
      Long.toString(task.getTaskData().getProcessInstanceId()),
      "",
      name,
      task.getTaskData().getActualOwner() == null ? null : task.getTaskData().getActualOwner().getId(),
View Full Code Here

      listBox.addRowSelectionHandler(
          new RowSelectionHandler()
          {
            public void onRowSelection(RowSelectionEvent rowSelectionEvent)
            {
              TaskRef task = getSelection(); // first call always null?
              if(task!=null)
              {
                if (!task.isBlocking()) {
                  skipBtn.setEnabled(true);
                } else {
                  skipBtn.setEnabled(false);
                }
                controller.handleEvent(
                    new Event(UpdateDetailsAction.ID, new DetailViewEvent("OpenDetailView", task))
                );
              }
            }
          }
      );

      // toolbar
      final MosaicPanel toolBox = new MosaicPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);

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


            }
          }
          )
      );

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

              if(selection!=null)
              {
                controller.handleEvent(
                    new Event(
                        ClaimTaskAction.ID,
                        new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
                    )
                );
              }
              else
              {
                MessageBox.alert("Missing selection", "Please select a task");
              }
            }
          }
          )
      );
     
      skipBtn = new Button("Skip", new ClickHandler() {
          public void onClick(ClickEvent clickEvent)
          {
            TaskRef selection = getSelection();

            if(selection!=null && !selection.isBlocking())
            {
              controller.handleEvent(
                        new Event(
                            SkipTaskAction.ID,
                            new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
View Full Code Here

      listBox.addRowSelectionHandler(
          new RowSelectionHandler()
          {
            public void onRowSelection(RowSelectionEvent rowSelectionEvent)
            {
              TaskRef task = getSelection(); // first call always null?
              if(task!=null)
              {
                if (!task.isBlocking()) {
                  skipBtn.setEnabled(true);
                } else {
                  skipBtn.setEnabled(false);
                }
                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");
              }
            }
          }
          )
      );
     
      skipBtn = new Button("Skip", new ClickHandler() {
          public void onClick(ClickEvent clickEvent)
          {
            TaskRef selection = getSelection();

            if(selection!=null && !selection.isBlocking())
            {
              controller.handleEvent(
                  new Event(
                      SkipTaskAction.ID,
                      new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
View Full Code Here

  public final static String ID = UpdateDetailsAction.class.getName();
 
  public void execute(Controller controller, Object object)
  {
    DetailViewEvent event = (DetailViewEvent)object;
    TaskRef task = event.getTask()!=null? event.getTask() : null;
    TaskDetailView view = (TaskDetailView)controller.getView(event.getViewRef());

    if(task!=null)
      view.update(task);
    else
View Full Code Here

      listBox.addRowSelectionHandler(
          new RowSelectionHandler()
          {
            public void onRowSelection(RowSelectionEvent rowSelectionEvent)
            {
              TaskRef task = getSelection(); // first call always null?
              if(task!=null)
              {
                controller.handleEvent(
                    new Event(UpdateDetailsAction.ID, new DetailViewEvent("OpenDetailView", task))
                );
              }
            }
          }
      );

      // toolbar
      final MosaicPanel toolBox = new MosaicPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);

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


            }
          }
          )
      );

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

              if(selection!=null)
              {
                controller.handleEvent(
                    new Event(
View Full Code Here

      listBox.addRowSelectionHandler(
          new RowSelectionHandler()
          {
            public void onRowSelection(RowSelectionEvent rowSelectionEvent)
            {
              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
View Full Code Here

    this.controller = controller;
  }

  public TaskRef getSelection()
  {
    TaskRef selection = null;
    if(isInitialized() && listBox.getSelectedIndex()!=-1)
    {
      selection = listBox.getItem( listBox.getSelectedIndex());     
    }
    return selection;
View Full Code Here

      listBox.addChangeListener(
          new ChangeListener() {

            public void onChange(Widget widget)
            {
              TaskRef task = getSelection(); // first call always null?
              if(task!=null)
              {
                controller.handleEvent(
                    new Event(UpdateDetailsAction.ID, new DetailViewEvent("OpenDetailView", task))
                );
              }            
            }
          }
      );

      // toolbar
      final LayoutPanel toolBox = new LayoutPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new ToolButton("Refresh", new ClickListener() {
            public void onClick(Widget sender) {
              // force loading
              controller.handleEvent(
                  new Event(LoadTasksParticipationAction.ID, getAssignedIdentity())
              );
            }
          }
          )
      );

      toolBar.addSeparator();

      toolBar.add(
          new ToolButton("Claim", new ClickListener() {
            public void onClick(Widget sender)
            {
              TaskRef selection = getSelection();

              if(selection!=null)
              {
                controller.handleEvent(
                    new Event(
View Full Code Here

      listBox.addChangeListener(
          new ChangeListener() {

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

      // 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(
          new ToolButton("Refresh", new ClickListener() {
            public void onClick(Widget sender) {
              // force loading
              controller.handleEvent(
                  new Event(LoadTasksAction.ID, appContext.getAuthentication().getUsername())
              );
            }
          }
          )
      );

      toolBar.addSeparator();

      ToolButton viewBtn = new ToolButton("View", new ClickListener()
      {
        public void onClick(Widget sender)
        {

          TaskRef selection = getSelection();

          if (selection != null)
          {
            if (selection.getUrl() != null && !selection.getUrl().equals(""))
              createTaskFormWindow(selection);
            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.addSeparator();

      toolBar.add(
          new ToolButton("Release", new ClickListener() {
            public void onClick(Widget sender) {

              TaskRef selection = getSelection();

              if(selection!=null)
              {
                TaskIdentityEvent payload = new TaskIdentityEvent(
                    null, selection
View Full Code Here

TOP

Related Classes of org.jboss.bpm.console.client.model.TaskRef

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.