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

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


    // 'site'
    // property to designate the current selection, and that uses the SITES
    // list for the available options.
    // Note that our model here holds a Collection, as we need to store
    // multiple values too
    ListMultipleChoice listChoice = new ListMultipleChoice("sites", SITES);
    form.add(listChoice);

    listChoice = new ListMultipleChoice("choices", MANY_CHOICES)
    {
      /**
       * @see org.apache.wicket.markup.html.form.AbstractChoice#isDisabled(java.lang.Object,
       *      int, java.lang.String)
       */
      @Override
      protected boolean isDisabled(Object object, int index, String selected)
      {
        if (index == 1)
          return true;
        return super.isDisabled(object, index, selected);
      }
    };
    listChoice.setMaxRows(5);
    form.add(listChoice);
  }
View Full Code Here


    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));
    form.add(new CheckBoxMultipleChoice("initialCheckBoxMultipleChoice", candidateChoices,
        bookChoiceRenderer));
    form.add(newCheckGroup("initialCheckGroup", candidateChoices));
    form.add(new ListMultipleChoice("listMultipleChoice", candidateChoices, bookChoiceRenderer)
        .setMaxRows(4));
    form.add(new CheckBoxMultipleChoice("checkBoxMultipleChoice", candidateChoices,
        bookChoiceRenderer));
    form.add(newCheckGroup("checkGroup", candidateChoices));
    form.add(new Button("anotherButton")
View Full Code Here

          item.add(new Label("number", item.getModelObjectAsString()));
        };
      };
      checks.add(checksList);

      add(new ListMultipleChoice("siteSelection", SITES));

      add(new TextField("urlProperty", URL.class)
      {
        public IConverter getConverter(Class clazz)
        {
View Full Code Here

     */
    public UserRolesStep()
    {
      super(new ResourceModel("userroles.title"), null);
      setSummaryModel(new StringResourceModel("userroles.summary", this, new Model(user)));
      final ListMultipleChoice rolesChoiceField = new ListMultipleChoice("user.roles",
          allRoles);
      add(rolesChoiceField);
      final TextField rolesSetNameField = new TextField("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
          // so might as well just skip them here
          return null;
        }

        public void validate(Form form)
        {
          String rolesInput = rolesChoiceField.getInput();
          if (rolesInput != null && (!"".equals(rolesInput)))
          {
            if ("".equals(rolesSetNameField.getInput()))
            {
              rolesSetNameField.error((IValidationError)new ValidationError()
View Full Code Here

          item.add(new Label("number", item.getModelObjectAsString()));
        };
      }.setReuseItems(true);
      checks.add(checksList);

      add(new ListMultipleChoice("siteSelection", SITES));

      // TextField using a custom converter.
      add(new TextField("urlProperty", URL.class)
      {
        public IConverter getConverter(final Class type)
View Full Code Here

      // Add radio choice test
      final RadioChoice relatedBook = new RadioChoice("relatedBook", books);
      add(relatedBook);

      // Multi-select among writing styles
      add(new ListMultipleChoice("writingStyles", EnumeratedType
          .getValues(Book.WritingStyle.class)));
    }
View Full Code Here

            getSubFoldersPage(getDocument());
            Form documentOrdering = new Form("docuOrderingForm");
            Label doucmentOrderLabel = new Label("doucmentOrderLabel",
                    "Document ordering");
            documentOrdering.add(doucmentOrderLabel);
            final ListMultipleChoice documnetOrder = new ListMultipleChoice(
                    "docOrders", new PropertyModel(this, "listChoice"),
                    getDocument().getDocumentOrder());
            final HiddenField pageOrder = new HiddenField("pageOrder",
                    new PropertyModel(this, "orderedList"));
            documentOrdering.add(documnetOrder);
View Full Code Here

                 * ===================================================
                 * Notify list
                 * ===================================================
                 */
                List<ItemUser> choices = UserUtils.convertToItemUserList(userSpaceRoles);
                ListMultipleChoice itemUsers = new JtracCheckBoxMultipleChoice("itemUsers", choices,
                        new IChoiceRenderer() {
                            public Object getDisplayValue(Object o) {
                                return ((ItemUser) o).getUser().getName();
                            }
                           
View Full Code Here

                }
            });
            add(statusChoice);
            // notify list =====================================================
            List<ItemUser> choices = UserUtils.convertToItemUserList(userSpaceRoles);
            ListMultipleChoice itemUsers = new JtracCheckBoxMultipleChoice("itemUsers", choices, new IChoiceRenderer() {
                public Object getDisplayValue(Object o) {
                    return ((ItemUser) o).getUser().getName();
                }
                public String getIdValue(Object o, int i) {
                    return ((ItemUser) o).getUser().getId() + "";
View Full Code Here

          item.add(new Label("number", item.getModelObjectAsString()));
        };
      }.setReuseItems(true);
      checks.add(checksList);

      add(new ListMultipleChoice("siteSelection", SITES));

      // TextField using a custom converter.
      add(new TextField("urlProperty", URL.class)
      {
        @Override
View Full Code Here

TOP

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

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.