Package org.olat.core.gui.components.table

Examples of org.olat.core.gui.components.table.DefaultColumnDescriptor


   * @param identity
   * @return
   */
  private void buildTableController(UserRequest ureq, WindowControl control) {
    tblCtr = new TableController(null, ureq, control, getTranslator(), this);
    tblCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.group.type", 0, null, ureq.getLocale()));
    tblCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.group.name", 1, TABLE_ACTION_LAUNCH, ureq.getLocale()));
    tblCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.user.role", 2, null, ureq.getLocale()));
    tblCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.user.joindate", 3, null, ureq.getLocale()));
       
    //build data model
    BusinessGroupManager bgm = BusinessGroupManagerImpl.getInstance();
    Manager sm = ManagerFactory.getManager();
    List<Object[]> userGroups = new ArrayList<Object[]>();
View Full Code Here


    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setTableEmptyMessage(pT.translate("error.no.repository.found"));
    if (tableCtr != null) tableCtr.dispose();
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), pT, this);
    tableCtr.addColumnDescriptor(new RepositoryEntryTypeColumnDescriptor("table.header.typeimg", 0,null, pT.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.displayname", 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.author", 2, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.lastusage", 3, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.deleteEmail", 4, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new StaticColumnDescriptor(ACTION_SINGLESELECT_CHOOSE, "table.header.action", myContent
          .getTranslator().translate("action.activate")));
   
    updateRepositoryEntryList();
    tableCtr.setMultiSelect(false);
View Full Code Here

  private TableController createTableController(UserRequest ureq, boolean hasAnyWaitingList) {
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setTableEmptyMessage(trans.translate("grouplist.no.groups"));
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), trans, this);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("grouplist.table.name", 0, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("grouplist.table.desc", 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("grouplist.table.partipiciant", 2, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(hasAnyWaitingList,new DefaultColumnDescriptor("grouplist.table.waitingList", 3, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("grouplist.table.state", 4, null, ureq.getLocale()));
    BooleanColumnDescriptor columnDesc = new BooleanColumnDescriptor("grouplist.table.enroll", 5, CMD_ENROLL_IN_GROUP, trans
        .translate(CMD_ENROLL_IN_GROUP), trans.translate("grouplist.table.no_action"));
    columnDesc.setSortingAllowed(false);
    tableCtr.addColumnDescriptor(columnDesc);
     tableCtr.addColumnDescriptor(new BooleanColumnDescriptor("grouplist.table.cancel_enroll", 6, CMD_ENROLLED_CANCEL, trans
View Full Code Here

  private void initializeTableController(UserRequest ureq) {
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setTableEmptyMessage(pT.translate("error.no.repository.found"));
    if (tableCtr != null) tableCtr.dispose();
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), pT, this);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.bgname", 0, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.description", 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.type", 2, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.lastusage", 3, null, ureq.getLocale()));
    tableCtr.addMultiSelectAction("action.delete.selection", ACTION_MULTISELECT_CHOOSE);
    tableCtr.addColumnDescriptor(new StaticColumnDescriptor(ACTION_SINGLESELECT_CHOOSE, "table.header.action", myContent
          .getTranslator().translate("action.activate")));
    tableCtr.setMultiSelect(true);
  }
View Full Code Here

    tableConfig.setTableEmptyMessage(translate("projectlist.no.projects"));
    tableConfig.setPreferencesOffered(true, "projectbrokerList");
    tableConfig.setShowAllLinkEnabled(false);// Do not allow show all because many entries takes too long to render
    TableController tableController = new TableController(tableConfig, ureq, wControl, this.getTranslator(), this, true);
    int dataColumn = 0;
    tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.title", dataColumn++, TABLE_ACTION_SHOW_DETAIL, ureq.getLocale()));
    DefaultColumnDescriptor projectManagerDescriptor = new DefaultColumnDescriptor("projectlist.tableheader.account.manager", dataColumn++, TABLE_ACTION_ACCOUNT_MANAGER, ureq.getLocale());
    projectManagerDescriptor.setIsPopUpWindowAction( true, "height=600, width=900, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no");
    tableController.addColumnDescriptor(projectManagerDescriptor);
    // Custom-Fields
    List<CustomField> customFieldList = moduleConfig.getCustomFields();
    for (Iterator iterator = customFieldList.iterator(); iterator.hasNext();) {
      CustomField customField = (CustomField) iterator.next();
      if (customField.isTableViewEnabled()) {
        numberOfCustomFieldInTable++;
        DefaultColumnDescriptor columnDescriptor = new DefaultColumnDescriptor(customField.getName(), dataColumn++,null, ureq.getLocale());
        columnDescriptor.setTranslateHeaderKey(false);
        tableController.addColumnDescriptor(columnDescriptor);       
      }
    }
    // Project Events
    for (Project.EventType eventType : Project.EventType.values()) {
      if (moduleConfig.isProjectEventEnabled(eventType) && moduleConfig.isProjectEventTableViewEnabled(eventType)) {
        numberOfEventInTable ++;
        tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.event." + eventType.getI18nKey(), dataColumn++,null, ureq.getLocale()));       
      }
    }
   
    tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.state", dataColumn++,null, ureq.getLocale()));
    tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.numbers", dataColumn++, null, ureq.getLocale()));
    tableController.addColumnDescriptor(new BooleanColumnDescriptor("projectlist.tableheader.select", dataColumn++, TABLE_ACTION_SELECT,
        translate("table.action.select"), "-" ));
    tableController.addColumnDescriptor(new BooleanColumnDescriptor("projectlist.tableheader.cancel.select", dataColumn++, TABLE_ACTION_CANCEL_SELECT,
        translate("projectlist.tableheader.cancel.select"), "-" ));
View Full Code Here

    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setTableEmptyMessage(translate("error.no.repository.found"));
    tableConfig.setShowAllLinkEnabled(false);
    //use null as listener argument because we are using listenTo(..) from basiccontroller
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), null);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.bgname", 0, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.description", 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.type", 2, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.lastusage", 3, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.deleteEmail", 4, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new StaticColumnDescriptor(ACTION_SINGLESELECT_CHOOSE, "table.header.action", myContent
          .getTranslator().translate("action.activate")));
    listenTo(tableCtr);
   
    tableCtr.addMultiSelectAction("action.ready.to.delete", ACTION_MULTISELECT_CHOOSE);
View Full Code Here

        tableCtr = new TableController(tableConfig, ureq, wControl, translator, this);
        // Switch between non-task-preview or task-preview
        Boolean hasPreview = config.getBooleanEntry(TACourseNode.CONF_TASK_PREVIEW);
        if ( (hasPreview == null) || (hasPreview.booleanValue()==false )) {
          // No Preview Mode, Show only file-name
          tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("task.table.th_task", 0, null, ureq.getLocale()));
        } else {
          // Preview Mode, Show only file-name
          DefaultColumnDescriptor columnDescriptor = new DefaultColumnDescriptor("task.table.th_task", 0, ACTION_PREVIEW, ureq.getLocale());
          columnDescriptor.setIsPopUpWindowAction(true,DefaultColumnDescriptor.DEFAULT_POPUP_ATTRIBUTES );
          tableCtr.addColumnDescriptor(columnDescriptor);
        }
        tableCtr.addColumnDescriptor(new StaticColumnDescriptor("seltask", "task.table.th_action", translator.translate("task.table.choose")));
        List availableTasks = compileAvailableTasks();
        if (availableTasks.size() == 0) { // no more tasks available
View Full Code Here

  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
      return new DefaultColumnDescriptor("stat.table.header.node", 0, null, ureq.getLocale());
    }
    return new TotalAwareColumnDescriptor("stat.table.header.day"+headerId, column, StatisticDisplayController.CLICK_TOTAL_ACTION+column, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT);
  }
View Full Code Here

    columns.add(snapOfLoadedCoursesAuthor);
   
   
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), null);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("current.active.user", 0, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor(CourseAdminTableModel.LOADTIME, 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor(CourseAdminTableModel.NR_OF_LAUNCHES, 2, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("course.title", 3, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("course.author", 4, null, ureq.getLocale()));
    tableCtr.setTableDataModel(new CourseAdminTableModel());
    listenTo(tableCtr);
    if(snapOfLoadedCoursesKeysCol.size() > 0){
      mainVC.put("table", tableCtr.getInitialComponent());
    }
View Full Code Here

   
    nodeListCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
    // table columns   
    nodeListCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.node", 0,
        null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new IndentedNodeRenderer()));
    nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.action.select", 1,
        CMD_SELECT_NODE, ureq.getLocale()));
   
    nodeTableModel = new NodeTableDataModel(nodesTableObjectArrayList, getTranslator());
    nodeListCtr.setTableDataModel(nodeTableModel);
    nodeChooseVC.put("nodeTable", nodeListCtr.getInitialComponent());
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.table.DefaultColumnDescriptor

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.