Examples of TaskRef


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

      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

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

      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

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

    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

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

      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

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

      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

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

  public abstract void update(String identity, List<TaskRef> tasks);

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

Examples of org.jbpm.formbuilder.shared.task.TaskRef

        resource.get().send(new SimpleTextCallback(i18n.CouldntReadSingleIO()) {
            @Override
            public void onSuccess(Method method, String response) {
                List<TaskRef> tasks = helper.readTasks(response);
                if (tasks.size() == 1) {
                    TaskRef singleTask = tasks.iterator().next();
                    bus.fireEvent(new TaskSelectedEvent(singleTask));
                }
            }
        });
    }
View Full Code Here

Examples of org.jbpm.formbuilder.shared.task.TaskRef

        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
   
    public void testListTasksDTOElementsWithNoContent() throws Exception {
        List<TaskRef> tasks = new ArrayList<TaskRef>();
        TaskRef task1 = new TaskRef();
        tasks.add(task1);
        TaskRef task2 = new TaskRef();
        tasks.add(task2);
        ListTasksDTO dto = new ListTasksDTO(tasks);
        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
View Full Code Here

Examples of org.jbpm.formbuilder.shared.task.TaskRef

        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
   
    public void testListTasksDTOElementsWithContent() throws Exception {
        List<TaskRef> tasks = new ArrayList<TaskRef>();
        TaskRef task1 = new TaskRef();
        task1.setPackageName("myPackage");
        task1.setProcessId("myProcessId");
        task1.setProcessName("myProcessName");
        task1.setTaskId("myTaskId");
        task1.addInput("myInput1", "myValue1");
        task1.addInput("myInput2", "myValue2");
        task1.addOutput("myOutput1", "myValue3");
        task1.addOutput("myOutput2", "myValue4");
        Map<String, String> metaData1 = new HashMap<String, String>();
        metaData1.put("myMetaDataKey1", "myMetaDataValue1");
        metaData1.put("myMetaDataKey2", "myMetaDataValue2");
        task1.setMetaData(metaData1);
        tasks.add(task1);
        TaskRef task2 = new TaskRef();
        task2.setPackageName("yourPackage");
        task2.setProcessId("yourProcessId");
        task2.setProcessName("yourProcessName");
        task2.setTaskId("yourTaskId");
        task2.addInput("yourInput1", "yourValue1");
        task2.addInput("yourInput2", "yourValue2");
        task2.addOutput("yourOutput1", "yourValue3");
        task2.addOutput("yourOutput2", "yourValue4");
        Map<String, String> metaData2 = new HashMap<String, String>();
        metaData2.put("yourMetaDataKey1", "yourMetaDataValue1");
        metaData2.put("yourMetaDataKey2", "yourMetaDataValue2");
        task2.setMetaData(metaData2);
        tasks.add(task2);
        ListTasksDTO dto = new ListTasksDTO(tasks);
        jaxbSimulation(dto, ListTasksDTO.class, ListTasksDTO.RELATED_CLASSES);
    }
View Full Code Here

Examples of org.jbpm.formbuilder.shared.task.TaskRef

        EasyMock.verify(view, service, i18n, filterView, advancedView);
    }
   
    @Test
    public void testTaskSelected() throws Exception {
        TaskRef task = new TaskRef();
        view.setSelectedTask(EasyMock.eq(task));
        EasyMock.expectLastCall().once();
       
        EasyMock.replay(view, service, i18n, filterView, advancedView);
        new IoAssociationPresenter(view);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.