Package org.apache.openmeetings.web.common

Examples of org.apache.openmeetings.web.common.ConfirmCallListener


      private static final long serialVersionUID = 839803820502260006L;

      @Override
      protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
        super.updateAjaxAttributes(attributes);
        attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
      }
     
      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        // repaint the feedback panel so that it is hidden
View Full Code Here


      private static final long serialVersionUID = -1650946343073068686L;

      @Override
      protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
        super.updateAjaxAttributes(attributes);
        attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
      }
     
      @Override
      protected void onEvent(AjaxRequestTarget target) {
        langPanel.language.setDeleted(true);
View Full Code Here

          private static final long serialVersionUID = 1L;

          @Override
          protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
            super.updateAjaxAttributes(attributes);
            attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
          }
         
          @Override
          protected void onEvent(AjaxRequestTarget target) {
            Application.getBean(OrganisationUserDao.class).delete(orgUser, WebSession.getUserId());
View Full Code Here

          private static final long serialVersionUID = 1L;

          @Override
          protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
            super.updateAjaxAttributes(attributes);
            attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
          }
         
          @Override
          protected void onEvent(AjaxRequestTarget target) {
            Client c = item.getModelObject();
            getBean(IUserService.class).kickUserByStreamId(getSid(), c.getStreamid()
                , c.getServer() == null ? 0 : c.getServer().getId());
           
            updatClients(target);
          }
        }));
      }
    };
    add(clientsContainer.add(clients.setOutputMarkupId(true)).setOutputMarkupId(true));
   
    // Moderators
    moderators =  new ListView<RoomModerator>("moderators", moderatorsInRoom) {
      private static final long serialVersionUID = -7935197812421549677L;

      @Override
      protected void populateItem(final ListItem<RoomModerator> item) {
        final RoomModerator moderator = item.getModelObject();
        item.add(new Label("isSuperModerator", "" + moderator.getIsSuperModerator()))
          .add(new Label("userId", "" + moderator.getUser().getUser_id()))
          .add(new Label("uName", "" + moderator.getUser().getFirstname() + " " + moderator.getUser().getLastname()))
          .add(new Label("email", ""+ moderator.getUser().getAdresses().getEmail()))
          .add(new WebMarkupContainer("delete").add(new AjaxEventBehavior("onclick"){
          private static final long serialVersionUID = 1L;

          @Override
          protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
            super.updateAjaxAttributes(attributes);
            attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
          }
         
          @Override
          protected void onEvent(AjaxRequestTarget target) {
            Application.getBean(RoomModeratorsDao.class).removeRoomModeratorByUserId(moderator.getRoomModeratorsId());
View Full Code Here

            private static final long serialVersionUID = 1L;
 
            @Override
            protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
              super.updateAjaxAttributes(attributes);
              attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
            }
           
            @Override
            protected void onEvent(AjaxRequestTarget target) {
              Client c = item.getModelObject();
              getBean(IUserService.class).kickUserByStreamId(getSid(), c.getStreamid()
                  , c.getServer() == null ? 0 : c.getServer().getId());
             
              updateClients(target);
            }
          }));
      }
    };
    add(clientsContainer.add(clients.setOutputMarkupId(true)).setOutputMarkupId(true));
   
    // Moderators
    final Select2Choice<User> moderatorChoice = new Select2Choice<User>("moderator2add", moderator2add, new AdminUserChoiceProvider() {
      private static final long serialVersionUID = 1L;

      @Override
      public void query(String term, int page, Response<User> response) {
        response.addAll(getBean(UserDao.class).get(term, false, page * PAGE_SIZE, PAGE_SIZE));
        response.setHasMore(PAGE_SIZE == response.getResults().size());
      }

      @Override
      protected String getDisplayText(User choice) {
        Address a = choice.getAdresses();
        return String.format("\"%s %s\" <%s>", choice.getFirstname(), choice.getLastname(), a == null ? "" : a.getEmail());
      }
    });
    add(moderatorChoice.add(new OnChangeAjaxBehavior() {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onUpdate(AjaxRequestTarget target) {
        Room r = RoomForm.this.getModelObject();
        User u = moderator2add.getObject();
        boolean found = false;
        if (u != null) {
          for (RoomModerator rm : r.getModerators()) {
            if (rm.getUser().getUser_id().equals(u.getUser_id())) {
              found = true;
              break;
            }
          }
          if (!found) {
            RoomModerator rm = new RoomModerator();
            rm.setRoomId(r.getRooms_id());
            rm.setUser(u);
            r.getModerators().add(0, rm);
            moderator2add.setObject(null);
            target.add(moderatorContainer, moderatorChoice);
          }
        }
      }
    }).setOutputMarkupId(true));
    add(moderatorContainer.add(new ListView<RoomModerator>("moderators") {
      private static final long serialVersionUID = 1L;

      @Override
      protected void populateItem(final ListItem<RoomModerator> item) {
        RoomModerator moderator = item.getModelObject();
        Label name = new Label("uName", moderator.getUser().getFirstname() + " " + moderator.getUser().getLastname());
        if (moderator.getRoomModeratorsId() == 0) {
          name.add(AttributeAppender.append("class", "newItem"));
        }
        item.add(new CheckBox("isSuperModerator", new PropertyModel<Boolean>(moderator, "isSuperModerator")))
          .add(new Label("userId", "" + moderator.getUser().getUser_id()))
          .add(name)
          .add(new Label("email", moderator.getUser().getAdresses().getEmail()))
          .add(new WebMarkupContainer("delete").add(new AjaxEventBehavior("onclick"){
            private static final long serialVersionUID = 1L;
 
            @Override
            protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
              super.updateAjaxAttributes(attributes);
              attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
            }
           
            @Override
            protected void onEvent(AjaxRequestTarget target) {
              RoomForm.this.getModelObject().getModerators().remove(item.getIndex());
View Full Code Here

          private static final long serialVersionUID = 1L;

          @Override
          protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
            super.updateAjaxAttributes(attributes);
            attributes.getAjaxCallListeners().add(new ConfirmCallListener(833L));
          }
         
          @Override
          protected void onEvent(AjaxRequestTarget target) {
            if (orgUser.getOrganisation_users_id() == null) {
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.web.common.ConfirmCallListener

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.