Package org.olat.repository

Examples of org.olat.repository.RepositoryTableModel


      Translator resourceTrans = Util.createPackageTranslator(RepositoryTableModel.class, ureq.getLocale(), getTranslator());
     
      TableGuiConfiguration tableConfig = new TableGuiConfiguration();   
      if (resourcesCtr != null) resourcesCtr.dispose();
      resourcesCtr = new TableController(tableConfig, ureq, getWindowControl(), resourceTrans, this);
      RepositoryTableModel repoTableModel = new RepositoryTableModel(resourceTrans);
      repoTableModel.setEntries(repoTableModelEntries);
      repoTableModel.addColumnDescriptors(resourcesCtr, null, false);
      resourcesCtr.setTableDataModel(repoTableModel);
      overviewVC.put("otherResources", resourcesCtr.getInitialComponent());
      overviewVC.contextPut("usedByOtherResources", Boolean.TRUE);
    } else {
      overviewVC.contextRemove("otherResources");
View Full Code Here


   
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    if (selectButtonLabel != null) tableConfig.setPreferencesOffered(true, "repositorySearchResult");
   
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), translator, this);
    repoTableModel = new RepositoryTableModel(translator);
    repoTableModel.addColumnDescriptors(tableCtr, selectButtonLabel, enableDirectLaunch);
    tableCtr.addMultiSelectAction("resource.table.select", ACTION_MULTI_SELECT);
    tableCtr.setMultiSelect(true);
    tableCtr.setTableDataModel(repoTableModel);
    tableCtr.setSortColumn(2, true);
View Full Code Here

      this.resourcesCtr = new TableController(tableConfig, ureq, getWindowControl(), resourceTrans, this);
      this.tabResourcesVC = createVelocityContainer("tab_resources");
      this.addTabResourcesButton = LinkFactory.createButtonSmall("cmd.addresource", this.tabResourcesVC, this);
    }

    this.repoTableModel = new RepositoryTableModel(resourceTrans);
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    this.repoTableModelEntries = contextManager.findRepositoryEntriesForBGContext(this.groupContext);
    this.repoTableModel.setEntries(this.repoTableModelEntries);
    if (!initOnlyModel) {
      this.repoTableModel.addColumnDescriptors(this.resourcesCtr, translate("resources.remove"), false);
View Full Code Here

    } else if (source == resourcesCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        RepositoryTableModel repoTableModel = (RepositoryTableModel) resourcesCtr.getTableDataModel();
        RepositoryEntry currentRepoEntry = (RepositoryEntry)repoTableModel.getObject(rowid);
        if (actionid.equals(RepositoryTableModel.TABLE_ACTION_SELECT_LINK)) {
          OLATResource ores = currentRepoEntry.getOlatResource();
          if (ores == null) throw new AssertException("repoEntry had no olatresource, repoKey = " + currentRepoEntry.getKey());
         
          addLoggingResourceable(LoggingResourceable.wrap(ores, OlatResourceableType.genRepoEntry));
View Full Code Here

    }
  }

  private void doShowResources(UserRequest ureq) {
    // always refresh data model, maybe it has changed
    RepositoryTableModel repoTableModel = new RepositoryTableModel(resourceTrans);
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    List repoTableModelEntries = contextManager.findRepositoryEntriesForBGContext(businessGroup.getGroupContext());
    repoTableModel.setEntries(repoTableModelEntries);
    // init table controller only once
    if (resourcesCtr == null) {
      TableGuiConfiguration tableConfig = new TableGuiConfiguration();
      tableConfig.setTableEmptyMessage(translate("resources.noresources"));
      resourcesCtr = new TableController(tableConfig, ureq, getWindowControl(), resourceTrans, null);
      listenTo(resourcesCtr);
     
      resourcesVC = createVelocityContainer("resources");
      repoTableModel.addColumnDescriptors(resourcesCtr, translate("resources.launch"), false);
      resourcesVC.put("resources", resourcesCtr.getInitialComponent());
    }
    // add table model to table
    resourcesCtr.setTableDataModel(repoTableModel);
    mainPanel.setContent(resourcesVC);
View Full Code Here

    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    if (selectButtonLabel != null) tableConfig.setPreferencesOffered(true, "repositorySearchResult");
   
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), translator, this, true);

    repoTableModel = new RepositoryTableModel(translator);
    repoTableModel.addColumnDescriptors(tableCtr, selectButtonLabel, enableDirectLaunch);
    tableCtr.setTableDataModel(repoTableModel);
    tableCtr.setSortColumn(1, true);
    vc.put("repotable", tableCtr.getInitialComponent());
View Full Code Here

TOP

Related Classes of org.olat.repository.RepositoryTableModel

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.