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

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


  private void initializeTableController(UserRequest ureq) {
    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 RepositoryEntryTypeColumnDescriptor("table.header.typeimg", 0,null, ureq.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()));
View Full Code Here


   * @param control
   * @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()));
       
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 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()));
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()));
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);
View Full Code Here

    numberOfEventInTable = 0;   
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    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"), "-" ));

    return tableController;

  }
View Full Code Here

  private void initializeTableController(UserRequest ureq) {
    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()));
View Full Code Here

        }
      } else { // let user choose a task
        myContent.setPage(VELOCITY_ROOT + "/taskChoose.html");
       
        TableGuiConfiguration tableConfig = new TableGuiConfiguration();
        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()));
View Full Code Here

    columns.add(snapOfLoadedCoursesTitleCol);
    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()));
View Full Code Here

    tableConfig.setSortingEnabled(false);
    tableConfig.setDisplayTableHeader(true);
    tableConfig.setDisplayRowCount(false);
    tableConfig.setPageingEnabled(false);
   
    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()));
View Full Code Here

TOP

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

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.