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

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


    tableConfig.setDisplayTableHeader(true);
    tableConfig.setDisplayRowCount(true);
    tableConfig.setPageingEnabled(true);
    tableConfig.setDownloadOffered(true);
    tableConfig.setSortingEnabled(true);
    TableController tableController = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
    //    tableCtr.addColumnDescriptor(statisticManager.createColumnDescriptor(ureq, 0, null));
    IndentedStatisticNodeRenderer indentedNodeRenderer = new IndentedStatisticNodeRenderer(Util.createPackageTranslator(statisticManager.getClass(), ureq.getLocale()));
    indentedNodeRenderer.setSimpleRenderingOnExport(true);
    CustomRenderColumnDescriptor nodeCD = new CustomRenderColumnDescriptor("stat.table.header.node", 0,
        CLICK_NODE_ACTION, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, indentedNodeRenderer) {
      @Override
      public int compareTo(int rowa, int rowb) {
        // order by original row order
        return new Integer(rowa).compareTo(rowb);
      }
    };
    tableController.addColumnDescriptor(nodeCD);

    int column = 1;
    List<String> headers = result.getHeaders();
    for (Iterator<String> it = headers.iterator(); it.hasNext();) {
      final String aHeader = it.next();
      final int aColumnId = column++;
      tableController.addColumnDescriptor(statisticManager.createColumnDescriptor(ureq, aColumnId, aHeader));
    }
   
    tableController.addColumnDescriptor(new CustomRenderColumnDescriptor("stat.table.header.total", column,
        StatisticDisplayController.CLICK_TOTAL_ACTION+column, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT, new TotalColumnRenderer()) {
      @Override
      public String getAction(int row) {
        if (row==table.getTableDataModel().getRowCount()-1) {
          return super.getAction(row);
        } else {
          return null;
        }
      }
     
    });
   
    tableController.setTableDataModel(result);
   
    return tableController;
  }
View Full Code Here


    super(ureq,wControl);
 
    vcMain = this.createVelocityContainer("guidemo-table");
    TableGuiConfiguration tgc = new TableGuiConfiguration();
    tgc.setPreferencesOffered(true, "TableGuiDemoPrefs");
    table = new TableController(tgc, ureq, getWindowControl(), getTranslator(), this);
    table.setMultiSelect(true);
    table.addMultiSelectAction("guidemo.table.submit", "submitAction");
    table.addMultiSelectAction("guidemo.table.submit2", "submitAction2");
    table.addColumnDescriptor(new DefaultColumnDescriptor("guidemo.table.header1", 0, null, ureq.getLocale()));
    table.addColumnDescriptor(new DefaultColumnDescriptor("guidemo.table.header2", 1, null, ureq.getLocale()));
View Full Code Here

    tableConfig.setDisplayRowCount(false);
    tableConfig.setPageingEnabled(false);
    tableConfig.setDownloadOffered(false);
    //disable the default sorting for this table
    tableConfig.setSortingEnabled(false);
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), trans, this);
    // dummy header key, won't be used since setDisplayTableHeader is set to false
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("bookmarksPortlet.bgname", 0, CMD_LAUNCH, trans.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("bookmarksPortlet.type", 1, null, trans.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT));
   
    this.sortingCriteria = getPersistentSortingConfiguration(ureq);
View Full Code Here

    tableConfig.setSortingEnabled(false);
    tableConfig.setDisplayTableHeader(true);
    tableConfig.setDisplayRowCount(false);
    tableConfig.setPageingEnabled(false);
   
    nodeListCtr = new TableController(tableConfig, ureq, getWindowControl(), this.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

    myContent.put("bmarea", bmarea);

    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setDownloadOffered(false);
    tableConfig.setTableEmptyMessage(translate("bookmarks.nobookmarks"));
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), null);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.bm.title", 0, "choose", ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.bm.resource", 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.bm.description", 2, null, ureq.getLocale()));
    listenTo(tableCtr);
View Full Code Here

    super(ureq, wControl, Util.createPackageTranslator(HomeMainController.class, ureq.getLocale()));
    this.subscriberIdentity = subscriberIdentity;
    // Build the table that contains all the subscriptions
    TableGuiConfiguration tableGuiPrefs = new TableGuiConfiguration();
    tableGuiPrefs.setTableEmptyMessage(translate("subscriptions.no.subscriptions"));
    subscriptionsTableCtr = new TableController(tableGuiPrefs, ureq, wControl, getTranslator(), null);
    subscriptionsTableModel = new NotificationSubscriptionTableDataModel(getTranslator());
    subscriptionsTableModel.addTableColumns(subscriptionsTableCtr);
    updateSubscriptionsDataModel();
    listenTo(subscriptionsTableCtr);
    // Main view is a velocity container
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.