Package org.apache.wicket.markup.html.form

Examples of org.apache.wicket.markup.html.form.CheckBox


      add(new Label("MaxUploadSize", formatter.format(megaBytes)));

      // Add one file input field
      fileUploadField = new FileUploadField("fileInput");

      add(new CheckBox("includeFilesInBackup", includeFilesInBackup));

      // Set maximum size controlled by configuration
      setMaxSize(Bytes.bytes(maxBytes));

      // Add a component to download a file without page refresh
View Full Code Here


      // MarkupContainer row for remember me checkbox
      final WebMarkupContainer rememberMeRow = new WebMarkupContainer("rememberMeRow");
      add(rememberMeRow);

      // Add rememberMe checkbox
      rememberMeRow.add(new CheckBox("rememberMe", new PropertyModel<Boolean>(
        SignInPanel.this, "rememberMe")));

      // Make form values persistent
      setPersistent(rememberMe);
View Full Code Here

      add(new TextField<Double>("doubleProperty", Double.class).setRequired(true));

      add(new TextField<Integer>("integerInRangeProperty").setRequired(true).add(
        new RangeValidator<Integer>(0, 100)));

      add(new CheckBox("booleanProperty"));

      add(new Multiply("multiply"));

      // display the multiply result
      Label multiplyLabel = new Label("multiplyLabel", new PropertyModel<Integer>(
View Full Code Here

    add(email = new RequiredTextField<String>("adresses.email"));
    email.setLabel(Model.of(WebSession.getString(137)));
    email.add(RfcCompliantEmailAddressValidator.getInstance());
    add(new TextField<String>("adresses.phone"));
    add(new CheckBox("sendSMS"));
    DateTextField age = new DateTextField("age");
    DatePicker datePicker = new DatePicker() {
      private static final long serialVersionUID = 1L;

      @Override
View Full Code Here

    add(domain.add(domainId).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true));
    add(new Label("ownerId"));
    add(forDatePattern("starttime", WEB_DATE_PATTERN));
    add(forDatePattern("updatetime", WEB_DATE_PATTERN));

    add(new CheckBox("forceTimeZoneCheck"));

    add(new Select2MultiChoice<Right>("rights", null, new TextChoiceProvider<Right>() {
      private static final long serialVersionUID = 1L;

      @Override
View Full Code Here

    add(new DropDownChoice<RoomType>("roomtype", Application.getBean(RoomTypeDao.class).getAll(WebSession.getLanguage()),
        new ChoiceRenderer<RoomType>("label.value", "roomtypes_id")));

    add(new TextArea<String>("comment"));

    add(new CheckBox("appointment"));
    add(new CheckBox("ispublic"));

    List<Organisation> orgList = Application.getBean(OrganisationDao.class).get(0, Integer.MAX_VALUE);
    final List<RoomOrganisation> orgRooms = new ArrayList<RoomOrganisation>(orgList.size());
    for (Organisation org : orgList) {
      orgRooms.add(new RoomOrganisation(org, getModelObject()));
    }
    add(new Select2MultiChoice<RoomOrganisation>("roomOrganisations", null, new TextChoiceProvider<RoomOrganisation>() {
      private static final long serialVersionUID = 1L;

      @Override
      protected String getDisplayText(RoomOrganisation choice) {
        return choice.getOrganisation().getName();
      }

      @Override
      protected Object getId(RoomOrganisation choice) {
        return choice.getOrganisation().getOrganisation_id();
      }

      @Override
      public void query(String term, int page, Response<RoomOrganisation> response) {
        for (RoomOrganisation or : orgRooms) {
          if (Strings.isEmpty(term) || (!Strings.isEmpty(term) && or.getOrganisation().getName().contains(term))) {
            response.add(or);
          }
        }
      }

      @Override
      public Collection<RoomOrganisation> toChoices(Collection<String> _ids) {
        List<Long> ids = new ArrayList<Long>();
        for (String id : _ids) {
          ids.add(Long.parseLong(id));
        }
        List<RoomOrganisation> list = new ArrayList<RoomOrganisation>();
        for (Organisation o : getBean(OrganisationDao.class).get(ids)) {
          list.add(new RoomOrganisation(o, RoomForm.this.getModelObject()));
        }
        return list;
      }
    }));

    add(new CheckBox("isDemoRoom"));
    TextField<Integer> demoTime = new TextField<Integer>("demoTime");
    demoTime.setLabel(new Model<String>(WebSession.getString(637)));
    add(demoTime);
    add(new CheckBox("allowUserQuestions"));
    add(new CheckBox("isAudioOnly"));
    add(new CheckBox("allowFontStyles"));
    add(new CheckBox("isClosed"));
    add(new TextField<String>("redirectURL"));
    add(new CheckBox("waitForRecording"));
    add(new CheckBox("allowRecording"));

    add(new CheckBox("hideTopBar"));
    add(new CheckBox("hideChat"));
    add(new CheckBox("hideActivitiesAndActions"));
    add(new CheckBox("hideFilesExplorer"));
    add(new CheckBox("hideActionsMenu"));
    add(new CheckBox("hideScreenSharing"));
    add(new CheckBox("hideWhiteboard"));
    add(new CheckBox("showMicrophoneStatus"));
    add(new CheckBox("chatModerated"));
    add(new CheckBox("chatOpened"));
    add(new CheckBox("filesOpened"));
    add(new CheckBox("autoVideoSelect"))
   
    // Users in this Room
    clients = new ListView<Client>("clients", clientsInRoom) {
      private static final long serialVersionUID = 1L;

      @Override
      protected void populateItem(final ListItem<Client> item) {
        Client client = item.getModelObject();
        item.add(new Label("clientId", "" + client.getId()))
          .add(new Label("clientLogin", "" + client.getUsername()))
          .add(new WebMarkupContainer("clientDelete").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) {
              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());
              target.add(moderatorContainer);
            }
          }));
      }
    }).setOutputMarkupId(true));

        add(new CheckBox("isModeratedRoom"));

    add(new TextField<String>("confno").setEnabled(false));
    add(pin = new TextField<String>("pin"));
    pin.setEnabled(room.isSipEnabled());
    add(new TextField<String>("ownerId").setEnabled(false));
View Full Code Here

      int selectedLdap = getBean(ConfigurationDao.class).getConfValue(CONFIG_DEFAULT_LDAP_ID, Integer.class, "0");
      domain = ldaps.get(selectedLdap < ldaps.size() && selectedLdap > 0 ? selectedLdap : 0);
      add(new WebMarkupContainer("ldap")
        .add(new DropDownChoice<LdapConfig>("domain", new PropertyModel<LdapConfig>(SignInDialog.this, "domain")
            , ldaps, new ChoiceRenderer<LdapConfig>("name", "ldapConfigId"))).setVisible(ldaps.size() > 1));
      add(new CheckBox("rememberMe", new PropertyModel<Boolean>(SignInDialog.this, "rememberMe")).setOutputMarkupId(true));
      add(new AjaxButton("submit") { //FAKE button so "submit-on-enter" works as expected
        private static final long serialVersionUID = -3612671587183668912L;

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
View Full Code Here

      @Override
      protected void populateItem(Item<Organisation_Users> item) {
        final Organisation_Users orgUser = item.getModelObject();
        User u = orgUser.getUser();
        item.add(new CheckBox("isModerator").add(new OnChangeAjaxBehavior() {
          private static final long serialVersionUID = 1L;

          @Override
          protected void onUpdate(AjaxRequestTarget target) {
            if (orgUser.getOrganisation_users_id() != null) {
View Full Code Here

    domainObject = new MockDomainObject();
    Form form = new Form("form", new CompoundPropertyModel(domainObject));
    add(form);

    form.add(new TextField("text"));
    form.add(new CheckBox("checkbox"));
    form.add(new TextArea("textarea"));
    form.add(new Button("submit"));
  }
View Full Code Here

    // single select family
    form.add(new DropDownChoice("dropDownChoice", candidateChoices, bookChoiceRenderer));
    form.add(new ListChoice("listChoice", candidateChoices, bookChoiceRenderer).setMaxRows(4));
    form.add(new RadioChoice("radioChoice", candidateChoices, bookChoiceRenderer));
    form.add(new CheckBox("checkBox"));
    form.add(newRadioGroup(candidateChoices));

    // multiple select family
    form.add(new ListMultipleChoice("initialListMultipleChoice", candidateChoices,
        bookChoiceRenderer));
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.CheckBox

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.