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

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


   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        if (te.getActionId().equals(ACTION_SINGLESELECT_CHOOSE)) {
          int rowid = te.getRowId();
          Identity foundIdentity = (Identity) tdm.getObject(rowid);
          UserDeletionManager.getInstance().setIdentityAsActiv(foundIdentity);
          updateUserList();
        }
      }
View Full Code Here


   */
  public void event(UserRequest ureq, Controller sourceController, Event event) {
    if (sourceController == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        // Single row selects
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(COMMAND_VCARD)) {
          // get identitiy and open new visiting card controller in new window
          int rowid = te.getRowId();
          final Identity identity = identitiesTableModel.getIdentityAt(rowid);
          ControllerCreator userInfoMainControllerCreator = new ControllerCreator() {
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
              return new UserInfoMainController(lureq, lwControl, identity);
            }         
          };
          //wrap the content controller into a full header layout
          ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, userInfoMainControllerCreator);
          //open in new browser window
          PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
          pbw.open(ureq);
          //
        } else if (actionid.equals(COMMAND_SELECTUSER)) {
          int rowid = te.getRowId();
          Identity identity = identitiesTableModel.getIdentityAt(rowid);
          // TODO whats this??
          fireEvent(ureq, new SingleIdentityChosenEvent(identity));
        }

View Full Code Here

  /**
   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest urequest, Controller source, Event event) {
    if (source == tableCtr) { // process table actions
      TableEvent te = (TableEvent)event;
      selectedEntry =  (RepositoryEntry)tableCtr.getTableDataModel().getObject(te.getRowId());
      if (te.getActionId().equals(RepositoryTableModel.TABLE_ACTION_SELECT_ENTRY)) {
        fireEvent(urequest, new Event(RepositoryTableModel.TABLE_ACTION_SELECT_ENTRY));
        return;
      } else if (te.getActionId().equals(RepositoryTableModel.TABLE_ACTION_SELECT_LINK)) {
        fireEvent(urequest, new Event(RepositoryTableModel.TABLE_ACTION_SELECT_LINK));
        return;
      }
    }
    else if (event instanceof EntryChangedEvent) { // remove deleted entry
View Full Code Here

        reset();
      }
    }
    else if (source == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        selRow = te.getRowId();
        // session info (we only have authenticated sessions here
        UserSession usess = (UserSession) usessTableModel.getObject(selRow);
        //if (!usess.isAuthenticated()) throw new AssertException("usersession was not authenticated!?");
        myContent.setPage(VELOCITY_ROOT + "/sessionDetails.html");
        myContent.contextPut("us", usess);
View Full Code Here

   */
  public void event(UserRequest ureq, Controller source, Event event) {
    super.event(ureq, source, event);
    if (source == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_LAUNCH)) {
          int rowId = te.getRowId();
          RepositoryEntry repoEntry = repoEntryListModel.getRepositoryEntry(rowId);
          // refresh repo entry, attach to hibernate session
          repoEntry = (RepositoryEntry) DBFactory.getInstance().loadObject(repoEntry);
          // get run controller fro this repo entry and launch it in new tab
          DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
View Full Code Here

 
  @Override
  protected void event(UserRequest ureq, Controller source, Event event) {
    if(source == manageChecklistTable) {
      if(event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent tableEvent = (TableEvent)event;
        selectedIdentity = manageTableData.getParticipantAt(tableEvent.getRowId());
        if(tableEvent.getActionId().equals(EDIT_ACTION)) {
          initEditTable(ureq, selectedIdentity);
          VelocityContainer vcManageUser = createVelocityContainer("manageUser");
          vcManageUser.put("table", editChecklistTable.getInitialComponent());
          String name = selectedIdentity.getUser().getProperty(UserConstants.FIRSTNAME, getLocale()) + " " + selectedIdentity.getUser().getProperty(UserConstants.LASTNAME, getLocale());
          visitingCardButton = LinkFactory.createLink("cl.manage.user.visitingcard", vcManageUser, this);
          visitingCardButton.setCustomDisplayText(name);
          cmc = new CloseableModalController(getWindowControl(), translate("cl.close"), vcManageUser, true, translate("cl.edit.title"));
          cmc.addControllerListener(this);
          cmc.activate();
        } else if(tableEvent.getActionId().equals(DETAILS_ACTION)) {
          openVisitingCard(ureq);
        }
      }
    } else if(source == editChecklistTable) {
      if(event instanceof TableMultiSelectEvent) {
View Full Code Here

        mainPanel.setContent(main);
      }

    } 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());
View Full Code Here

        MultiUserEvent mue = new BGContextEvent(BGContextEvent.CONTEXT_DELETED, this.currentGroupContext);
        CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(mue, this.currentGroupContext);
      }
    } else if (source == this.contextListCtr) {
      if (cmd.equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        this.currentGroupContext = this.contextTableModel.getGroupContextAt(rowid);
        if (actionid.equals(CMD_CONTEXT_EDIT)) {
          doContextEdit(ureq);
        } else if (actionid.equals(CMD_CONTEXT_RUN)) {
          doContextRun(ureq);
View Full Code Here

   */
  public void event(UserRequest ureq, Controller source, Event event) {
    super.event(ureq, source, event);
    if (source == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_LAUNCH)) {
          int rowid = te.getRowId();
          BusinessGroup currBusinessGroup = groupListModel.getBusinessGroupAt(rowid);
          boolean isInBusinessGroup = BusinessGroupManagerImpl.getInstance().isIdentityInBusinessGroup(ureq.getIdentity(), currBusinessGroup);
          if(isInBusinessGroup) {
            BGControllerFactory.getInstance().createRunControllerAsTopNavTab(currBusinessGroup, ureq, getWindowControl(), false, null);
          } else {
View Full Code Here

   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        if (te.getActionId().equals(ACTION_SINGLESELECT_CHOOSE)) {
          int rowid = te.getRowId();
          UserDeletionManager.getInstance().setIdentityAsActiv( (Identity) tdm.getObject(rowid) );
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(ACTION_MULTISELECT_CHOOSE)) {
View Full Code Here

TOP

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

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.