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

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


    fc = new RequiredTextField<String>("name");
    fc.add(new StringValidator(4, null));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));

    fc = new RequiredTextField<String>("email");
    fc.add(EmailAddressValidator.getInstance());
    fc.setLabel(new ResourceModel("label.email"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("email-label", fc));

    // attach an ajax validation behavior to all form component's keydown
    // event and throttle it down to once per second

    AjaxFormValidatingBehavior.addToAllFormComponents(form, "keydown", Duration.ONE_SECOND);
View Full Code Here


          Check<T> check = newCheck("buttonCheck", buttonElement.getModel(), checkGroup);
          check.setLabel(buttonElement.getLabel());
          check.setOutputMarkupId(true);

          SimpleFormComponentLabel label =
            new SimpleFormComponentLabel("buttonCheckLabel", check);

          item.add(check);
          item.add(label);
        }
      };
View Full Code Here

          Radio<T> radio = newRadio("buttonRadio", buttonElement.getModel(), radioGroup);
          radio.setLabel(buttonElement.getLabel());
          radio.setOutputMarkupId(true);

          SimpleFormComponentLabel label =
            new SimpleFormComponentLabel("buttonRadioLabel", radio);

          item.add(radio);
          item.add(label);
        }
      };
View Full Code Here

    fc = new RequiredTextField("name");
    fc.add(StringValidator.minimumLength(4));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));

    fc = new RequiredTextField("email");
    fc.add(EmailAddressValidator.getInstance());
    fc.setLabel(new ResourceModel("label.email"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("email-label", fc));

    // attach an ajax validation behavior to all form component's onkeydown
    // event and throttle it down to once per second

    AjaxFormValidatingBehavior.addToAllFormComponents(form, "onkeyup",
View Full Code Here

        protected void populateItem(ListItem<String> item)
        {
          Radio<String> radio = new Radio<String>("radio", item.getModel());
          radio.setLabel(item.getModel());
          item.add(radio);
          item.add(new SimpleFormComponentLabel("number", radio));
        };
      }.setReuseItems(true);
      group.add(persons);

      CheckGroup<String> checks = new CheckGroup<String>("numbersCheckGroup");
      add(checks);
      ListView<String> checksList = new ListView<String>("numbers", NUMBERS)
      {
        @Override
        protected void populateItem(ListItem<String> item)
        {
          Check<String> check = new Check<String>("check", item.getModel());
          check.setLabel(item.getModel());
          item.add(check);
          item.add(new SimpleFormComponentLabel("number", check));
        };
      }.setReuseItems(true);
      checks.add(checksList);

      add(new ListMultipleChoice<String>("siteSelection", SITES));
View Full Code Here

    fc = new RequiredTextField<String>("name");
    fc.add(StringValidator.minimumLength(4));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));

    fc = new RequiredTextField<String>("email");
    fc.add(EmailAddressValidator.getInstance());
    fc.setLabel(new ResourceModel("label.email"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("email-label", fc));

    // attach an ajax validation behavior to all form component's onkeydown
    // event and throttle it down to once per second

    AjaxFormValidatingBehavior.addToAllFormComponents(form, "onkeyup", Duration.ONE_SECOND);
View Full Code Here

    fc = new RequiredTextField("name");
    fc.add(StringValidator.minimumLength(4));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));

    fc = new RequiredTextField("email");
    fc.add(EmailAddressValidator.getInstance());
    fc.setLabel(new ResourceModel("label.email"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("email-label", fc));

    // attach an ajax validation behavior to all form component's onkeydown
    // event and throttle it down to once per second

    AjaxFormValidatingBehavior.addToAllFormComponents(form, "onkeyup", Duration.ONE_SECOND);
View Full Code Here

        protected void populateItem(ListItem<String> item)
        {
          Radio<String> radio = new Radio<String>("radio", item.getModel());
          radio.setLabel(item.getModel());
          item.add(radio);
          item.add(new SimpleFormComponentLabel("number", radio));
        };
      }.setReuseItems(true);
      group.add(persons);

      CheckGroup<String> checks = new CheckGroup<String>("numbersCheckGroup");
      add(checks);
      ListView<String> checksList = new ListView<String>("numbers", NUMBERS)
      {
        @Override
        protected void populateItem(ListItem<String> item)
        {
          Check<String> check = new Check<String>("check", item.getModel());
          check.setLabel(item.getModel());
          item.add(check);
          item.add(new SimpleFormComponentLabel("number", check));
        };
      }.setReuseItems(true);
      checks.add(checksList);

      add(new ListMultipleChoice<String>("siteSelection", SITES));
View Full Code Here

    fc = new RequiredTextField<String>("name");
    fc.add(StringValidator.minimumLength(4));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));

    fc = new RequiredTextField<String>("email");
    fc.add(EmailAddressValidator.getInstance());
    fc.setLabel(new ResourceModel("label.email"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("email-label", fc));

    // attach an ajax validation behavior to all form component's onkeydown
    // event and throttle it down to once per second

    AjaxFormValidatingBehavior.addToAllFormComponents(form, "onkeyup", Duration.ONE_SECOND);
View Full Code Here

    fc = new RequiredTextField<>("name");
    fc.add(new StringValidator(4, null));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));

    fc = new RequiredTextField<>("email");
    fc.add(EmailAddressValidator.getInstance());
    fc.setLabel(new ResourceModel("label.email"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("email-label", fc));

    // attach an ajax validation behavior to all form component's keydown
    // event and throttle it down to once per second

    form.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND));
View Full Code Here

TOP

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

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.