Package org.projectforge.web.task

Examples of org.projectforge.web.task.TaskSelectPanel


            userSelectPanel.setShowFavorites(false);
          }
          fs.add(userSelectPanel);
          userSelectPanel.init();
        } else if (TaskDO.class.isAssignableFrom(param.getType()) == true) {
          final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new UserPrefPropertyModel<TaskDO>(userPrefDao, param,
              "valueAsObject"), parentPage, param.getParameter());
          if (data.getArea() == UserPrefArea.TASK_FAVORITE) {
            taskSelectPanel.setShowFavorites(false);
          }
          fs.add(taskSelectPanel);
          taskSelectPanel.init();
        } else if (GroupDO.class.isAssignableFrom(param.getType()) == true) {
          final NewGroupSelectPanel groupSelectPanel = new NewGroupSelectPanel(fs.newChildId(), new UserPrefPropertyModel<GroupDO>(
              userPrefDao, param, "valueAsObject"), parentPage, param.getParameter());
          fs.add(groupSelectPanel);
          groupSelectPanel.init();
View Full Code Here


    super.init();
    gridBuilder.newGridPanel();
    {
      // Task
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task"));
      final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new PropertyModel<TaskDO>(data, "task"), parentPage, "taskId");
      fs.add(taskSelectPanel.setRequired(true));
      taskSelectPanel.init();
    }
    {
      // Group
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("group")).suppressLabelForWarning();
      groupSelectPanel = new NewGroupSelectPanel(fs.newChildId(), new PropertyModel<GroupDO>(data, "group"),
View Full Code Here

      fs.addHelpIcon(getString("access.tooltip.filter.user"));
    }
    gridBuilder.newGridPanel();
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task")).suppressLabelForWarning();
      final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new Model<TaskDO>() {
        @Override
        public TaskDO getObject()
        {
          return taskTree.getTaskById(getSearchFilter().getTaskId());
        }

        @Override
        public void setObject(final TaskDO task)
        {
          if (task != null) {
            getSearchFilter().setTaskId(task.getId());
          } else {
            getSearchFilter().setTaskId(null);
          }
        }
      }, parentPage, "taskId");
      fs.add(taskSelectPanel);
      taskSelectPanel.init();
      taskSelectPanel.setRequired(false);
    }
  }
View Full Code Here

        valueField = timeZonePanel.getTextField();
      } else if (data.getConfigurationType() == ConfigurationType.TASK) {
        if (data.getTaskId() != null) {
          this.task = taskDao.getById(data.getTaskId());
        }
        final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new PropertyModel<TaskDO>(this, "task"), parentPage, "taskId");
        fs.add(taskSelectPanel);
        taskSelectPanel.init();
      } else {
        throw new UnsupportedOperationException("Parameter of type '" + data.getConfigurationType() + "' not supported.");
      }
      if (valueField != null) {
        WicketUtils.setFocus(valueField);
View Full Code Here

    timesheetPageSupport = new TimesheetPageSupport(parentPage, gridBuilder, timesheetDao, data);
    gridBuilder.newGridPanel();
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task"));
      fs.addCheckBox(new PropertyModel<Boolean>(this, "updateTask"), getString("update") + ":", getString("massupdate.updateTask"));
      final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new PropertyModel<TaskDO>(data, "task"), parentPage, "taskId");
      fs.add(taskSelectPanel);
      taskSelectPanel.init();
    }
    {
      kost2Fieldset = new FieldsetPanel(gridBuilder.getPanel(), getString("fibu.kost2")) {
        @Override
        public boolean isVisible()
View Full Code Here

  {
    super.init();
    gridBuilder.newGridPanel();
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task"));
      final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new PropertyModel<TaskDO>(data, "task"), parentPage, "taskId") {
        @Override
        protected void selectTask(final TaskDO task)
        {
          super.selectTask(task);
          parentPage.refresh(); // Task was changed. Therefore update the kost2 list.
        }
      };
      fs.add(taskSelectPanel);
      taskSelectPanel.init();
      taskSelectPanel.setRequired(true);
    }
    gridBuilder.newSplitPanel(GridSize.COL50);
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("gantt.name"));
      final RequiredMaxLengthTextField name = new RequiredMaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(data, "name"));
View Full Code Here

    });
    final TimesheetFilter filter = getSearchFilter();
    {
      gridBuilder.newSplitPanel(GridSize.COL66);
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task")).suppressLabelForWarning();
      final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new Model<TaskDO>() {
        @Override
        public TaskDO getObject()
        {
          return taskTree.getTaskById(getSearchFilter().getTaskId());
        }

        @Override
        public void setObject(final TaskDO task)
        {
          if (task != null) {
            getSearchFilter().setTaskId(task.getId());
          } else {
            getSearchFilter().setTaskId(null);
          }
        }
      }, parentPage, "taskId");
      fs.add(taskSelectPanel);
      taskSelectPanel.init();
      taskSelectPanel.setRequired(false);
    }
    {
      // Assignee
      gridBuilder.newSplitPanel(GridSize.COL33);
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("user"));
View Full Code Here

          quickSelectPanel[index] = new QuickSelectPanel(fs.newChildId(), parentPage, "quickSelect:" + index, datePanel1[index]);
          fs.add(quickSelectPanel[index]);
          quickSelectPanel[index].init();
        }
      } else if (parameter.getType() == ScriptParameterType.TASK) {
        final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new PropertyModel<TaskDO>(parameter, "task"), parentPage, "taskId:"
            + index);
        fs.add(taskSelectPanel);
        taskSelectPanel.init();
        taskSelectPanel.setRequired(true);
      } else if (parameter.getType() == ScriptParameterType.USER) {
        final UserSelectPanel userSelectPanel = new UserSelectPanel(fs.newChildId(), new PropertyModel<PFUserDO>(parameter, "user"),
            parentPage, "userId:" + index);
        fs.add(userSelectPanel);
        userSelectPanel.init();
View Full Code Here

      addTemplatesRow();
    }
    {
      // Task
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task"));
      final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new PropertyModel<TaskDO>(data, "task"), parentPage, "taskId") {
        @Override
        protected void selectTask(final TaskDO task)
        {
          super.selectTask(task);
          refresh(); // Task was changed. Therefore update the kost2 list.
        }

        /**
         * @see org.projectforge.web.task.TaskSelectPanel#onModelSelected(org.apache.wicket.ajax.AjaxRequestTarget,
         *      org.projectforge.task.TaskDO)
         */
        @Override
        protected void onModelSelected(final AjaxRequestTarget target, final TaskDO taskDO)
        {
          refresh();
          super.onModelSelected(target, taskDO);
          if (cost2ChoiceFieldset != null) {
            target.add(cost2ChoiceFieldset.getFieldset());
          }
        }
      };
      taskSelectPanel.setAutocompleteOnlyTaskBookableForTimesheets(true);
      fs.add(taskSelectPanel);
      taskSelectPanel.init();
      taskSelectPanel.setRequired(true);
    }
    if (cost2Exists == true) {
      // Cost 2 entries does exist in the data-base.
      cost2ChoiceFieldset = gridBuilder.newFieldset(getString("fibu.kost2"));
      cost2ChoiceFieldset.getFieldset().setOutputMarkupId(true);
View Full Code Here

      fs.add(new MaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(data, "identifier")));
    }
    {
      // task
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task"));
      final TaskSelectPanel taskSelectPanel = new TaskSelectPanel(fs, new PropertyModel<TaskDO>(data, "task"), parentPage, "taskId");
      fs.add(taskSelectPanel);
      taskSelectPanel.init();
    }
    {
      // DropDownChoice status
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("status"));
      final LabelValueChoiceRenderer<ProjektStatus> statusChoiceRenderer = new LabelValueChoiceRenderer<ProjektStatus>(this,
View Full Code Here

TOP

Related Classes of org.projectforge.web.task.TaskSelectPanel

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.