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

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


    if(nodeListCtr!=null)nodeListCtr.dispose();
    nodeListCtr = new TableController(tableConfigNodeChoose, 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()));
   
    // get list of course node data and populate table data model
    ICourse course = CourseFactory.loadCourse(ores);
    CourseNode rootNode = course.getRunStructure().getRootNode();
View Full Code Here


      tableConfig.setTableEmptyMessage(translate("grouplist.no.groups"));
      // init group list filter controller
      groupListCtr = new TableController(tableConfig, ureq, getWindowControl(), this.areaFilters, this.currentAreaFilter,
          translate("grouplist.areafilter.title"), translate("grouplist.areafilter.nofilter"), getTranslator(), this);

      groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor("grouplist.table.name", 0, CMD_GROUP_RUN, ureq.getLocale()));
      groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor("grouplist.table.desc", 1, null, ureq.getLocale()));
      groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_GROUP_EDIT, "grouplist.table.edit", translate(CMD_GROUP_EDIT)));
      if (flags.isEnabled(BGConfigFlags.GROUPS_DELETE)) {
        groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_GROUP_DELETE, "grouplist.table.delete",
            translate(CMD_GROUP_DELETE)));
      }
View Full Code Here

      if (areaListCtr != null) areaListCtr.dispose();
      TableGuiConfiguration tableConfig = new TableGuiConfiguration();
      tableConfig.setTableEmptyMessage(translate("arealist.no.areas"));
      if (areaListCtr != null) areaListCtr.dispose();
      areaListCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
      areaListCtr.addColumnDescriptor(new DefaultColumnDescriptor("arealist.table.name", 0, null, ureq.getLocale()));
      areaListCtr.addColumnDescriptor(new DefaultColumnDescriptor("arealist.table.desc", 1, null, ureq.getLocale()));
      areaListCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_AREA_EDIT, "arealist.table.edit", translate(CMD_AREA_EDIT)));
      if (flags.isEnabled(BGConfigFlags.AREAS_DELETE)) {
        areaListCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_AREA_DELETE, "arealist.table.delete",
            translate(CMD_AREA_DELETE)));
      }
View Full Code Here

    this.changeableIdentity = changeableIdentity;   
   
    // init main view container as initial component
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), null);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.auth.provider", 0, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.auth.login", 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.auth.credential", 2, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new StaticColumnDescriptor("delete", "table.header.action", translate("delete")));
    authTableModel = new AuthenticationsTableDataModel(ManagerFactory.getManager().getAuthentications(changeableIdentity));
    tableCtr.setTableDataModel(authTableModel);
    listenTo(tableCtr);
View Full Code Here

   * @param tableCtr
   * @param actionCommand command fired when the login name is clicked or NULL when no command is used
   */
  public void addColumnDescriptors(TableController tableCtr, String actionCommand) {
    // first column is users login name
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.user.login", 0, actionCommand, getLocale()));
    // followed by the users fields
    for (int i = 0; i < userPropertyHandlers.size(); i++) {
      UserPropertyHandler userPropertyHandler  = userPropertyHandlers.get(i);
      boolean visible = UserManager.getInstance().isMandatoryUserProperty(usageIdentifyer , userPropertyHandler);
      tableCtr.addColumnDescriptor(visible, userPropertyHandler.getColumnDescriptor(i+1, null, getLocale()));           
View Full Code Here

   */
  public void addColumnDescriptors(TableController tableCtr, Translator trans) {
    setLocale(trans.getLocale());
    // first column is users login name
    // default rows
    DefaultColumnDescriptor cd0 = new DefaultColumnDescriptor("table.identity.name", 0,
        (actionEnabled ? ExtendedIdentitiesTableControllerFactory.COMMAND_VCARD : null), getLocale());
    cd0
        .setIsPopUpWindowAction(true,
            "height=700, width=900, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no");
    tableCtr.addColumnDescriptor(cd0);
    colCount++;
    UserManager um = UserManager.getInstance();
    // followed by the users fields
    for (int i = 0; i < userPropertyHandlers.size(); i++) {
      UserPropertyHandler userPropertyHandler = userPropertyHandlers.get(i);
      boolean visible = um.isMandatoryUserProperty(usageIdentifyer, userPropertyHandler);
      tableCtr.addColumnDescriptor(visible, userPropertyHandler.getColumnDescriptor(i + 1, null, getLocale()));
      colCount++;
    }
    // in the end the last login and creation date
    tableCtr.addColumnDescriptor(false, new DefaultColumnDescriptor("table.identity.lastlogin", colCount, null, getLocale()));
    colCount++;
    // creation date at the end, enabled by default
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.identity.creationdate", colCount, null, getLocale()));
    colCount++;
    if (actionEnabled) {
      tableCtr.addColumnDescriptor(new StaticColumnDescriptor(ExtendedIdentitiesTableControllerFactory.COMMAND_SELECTUSER,
          "table.identity.action", trans.translate("action.select")));
    }
View Full Code Here

    nodeListCtr = new TableController(tableConfig, ureq, getWindowControl(), this.getTranslator(), null);
    listenTo(nodeListCtr);
    // 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()));
   
    // get list of course node data and populate table data model
    ICourse course = CourseFactory.loadCourse(courseId);
    CourseNode rootNode = course.getRunStructure().getRootNode();
View Full Code Here

   */
  @Override
  protected void initGroupTable(TableController tableCtr, UserRequest ureq, boolean enableTablePreferences, boolean enableUserSelection) {
    List<UserPropertyHandler> userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);
    // first the login name
    DefaultColumnDescriptor cd0 = new DefaultColumnDescriptor("table.user.login", 0, COMMAND_VCARD, ureq.getLocale());
    cd0.setIsPopUpWindowAction(true,"height=700, width=900, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no");
    tableCtr.addColumnDescriptor(cd0);   
    // followed by the users fields
    int colId = 0;
    for (int i = 0; i < userPropertyHandlers.size(); i++) {
      UserPropertyHandler userPropertyHandler  = userPropertyHandlers.get(i);
      boolean visible = UserManager.getInstance().isMandatoryUserProperty(usageIdentifyer , userPropertyHandler);
      tableCtr.addColumnDescriptor(visible, userPropertyHandler.getColumnDescriptor(i+1, null, ureq.getLocale()))
      if(visible) {
        colId++;
      }
    }
    listenTo(tableCtr);
    // in the end
    if (enableTablePreferences) {
      tableCtr.addColumnDescriptor(true, new DefaultColumnDescriptor("table.subject.addeddate", userPropertyHandlers.size() + 1, null, ureq.getLocale()));
      colId++;     
      //Sort Waiting-list by addedDate
      tableCtr.setSortColumn(colId,true)
    }
   
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()));
   
    // get list of course node data and populate table data model
    CourseNode rootNode = course.getRunStructure().getRootNode();
    List nodesTableObjectArrayList = addAssessableNodesAndParentsToList(0, rootNode);
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);
   
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.