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

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


            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


            throw new RuntimeException("Cannot find elementType for property " + metaData.getPropertyName());
        }
       
        Object[] enumValues = elementType.getEnumConstants();

        ListMultipleChoice multChoice = new ListMultipleChoice("component", model, Arrays.asList(enumValues));
        multChoice.setEnabled(!viewOnly);
       
        add(multChoice);
    }
View Full Code Here

    public WCSLayerConfig(String id, IModel model){
        super(id, model);

        final CoverageInfo coverage = (CoverageInfo) getLayerInfo().getResource();
        add(new ListMultipleChoice("requestSRS",
                    new PropertyModel(this, "selectedRequestSRSs"),
                    coverage.getRequestSRS())
        );

        add(new TextField("newRequestSRS", new PropertyModel(this, "newRequestSRS")));

        add(new Button("deleteSelectedRequestSRSs"){
            public void onSubmit(){
                coverage.getRequestSRS().removeAll(selectedRequestSRSs);
                selectedRequestSRSs.clear();
            }
        });

        add(new Button("addNewRequestSRS"){
            public void onSubmit(){
                coverage.getRequestSRS().add(newRequestSRS);
                newRequestSRS = "";
            }
        });

        add (new ListMultipleChoice("responseSRS",
                    new PropertyModel(this, "selectedResponseSRSs"),
                    coverage.getResponseSRS())
        );

        add(new TextField("newResponseSRS", new PropertyModel(this, "newResponseSRS")));
View Full Code Here

     * @param keywords The module should return a non null collection of strings.
     */
    public KeywordsEditor(String id, final IModel keywords) {
        super(id, keywords);

        choices = new ListMultipleChoice("keywords", new Model(), new ArrayList((List) keywords.getObject()));
        choices.setOutputMarkupId(true);
        add(choices);
        add(removeKeywordsButton());
        newKeyword = new TextField("newKeyword", new Model());
        newKeyword.setOutputMarkupId(true);
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

          item.add(new Label("number", item.getModelObjectAsString()));
        };
      };
      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

     */
    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

    // '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).setMaxRows(5);
    form.add(listChoice);
  }
View Full Code Here

          item.add(new Label("number", item.getModelObjectAsString()));
        };
      };
      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

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.