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

Examples of org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink


      TextField<String> secondField = new TextField<String>("second");
      add(firstField);
      add(secondField);

      add(new EqualInputValidator(firstField, secondField));
      add(new AjaxSubmitLink("ajaxSubmit", this)
      {
        private static final long serialVersionUID = 1L;

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


    final Form<Void> form = new Form<Void>("form");
    form.setOutputMarkupId(true);
    addToBorder(form);
    form.add(getBodyContainer());

    form.add(new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

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

    form.add(new TextField<String>("textfield2", new PropertyModel<String>(this,
      "textfieldForm2")));
    form.add(new Label("lbltextfield2", new PropertyModel<String>(this, "textfieldForm2")));

    form.add(new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form)
      {
        info("onSubmit");
        hitOnSubmit = true;
        target.add(form);
      }

      @Override
      protected void onError(AjaxRequestTarget target, Form<?> form)
      {
        error("onError");
        hitOnError = true;
        target.add(form);
      }
    });

    // --------------------

    MyBorder border = new MyBorder("border");
    add(border);

    border.addToBorderBody(new TextField<String>("textfield1", new PropertyModel<String>(this,
      "textfield1")).setRequired(true));
    border.addToBorderBody(new Label("lbltextfield1", new PropertyModel<String>(this,
      "textfield1")));

    border.addToBorderBody(new TextField<String>("textfield2", new PropertyModel<String>(this,
      "textfield2")));
    border.addToBorderBody(new Label("lbltextfield2", new PropertyModel<String>(this,
      "textfield2")));

    // --------------------

    Form<Void> form3 = new Form<Void>("form3");
    MyPanel panel = new MyPanel("panel");
    form3.add(panel);
    form3.add(new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

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

    });

    // AjaxSubmitLink
    final Form form = new Form("form");
    add(form);
    final AjaxSubmitLink submit = new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

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

    Form<Void> form = new Form<Void>("form");
    add(form);
    form.add(receiver = new TextField<String>("receiver", Model.of("")));
    form.add(input = new TextField<String>("input", Model.of("")));
    form.add(new AjaxSubmitLink("send", form)
    {
      private static final long serialVersionUID = 1L;

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

    });

    // AjaxSubmitLink
    final Form form = new Form("form");
    add(form);
    final AjaxSubmitLink submit = new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

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

    form.add(new TextField<String>("textfield2", new PropertyModel<String>(this,
      "textfieldForm2")));
    form.add(new Label("lbltextfield2", new PropertyModel<String>(this, "textfieldForm2")));

    form.add(new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form)
      {
        info("onSubmit");
        hitOnSubmit = true;
        target.addComponent(form);
      }

      @Override
      protected void onError(AjaxRequestTarget target, Form<?> form)
      {
        error("onError");
        hitOnError = true;
        target.addComponent(form);
      }
    });

    // --------------------

    MyBorder border = new MyBorder("border");
    add(border);

    border.add(new TextField<String>("textfield1",
      new PropertyModel<String>(this, "textfield1")).setRequired(true));
    border.add(new Label("lbltextfield1", new PropertyModel<String>(this, "textfield1")));

    border.add(new TextField<String>("textfield2",
      new PropertyModel<String>(this, "textfield2")));
    border.add(new Label("lbltextfield2", new PropertyModel<String>(this, "textfield2")));

    // --------------------

    Form<Void> form3 = new Form<Void>("form3");
    MyPanel panel = new MyPanel("panel");
    form3.add(panel);
    form3.add(new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

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

    form.setOutputMarkupId(true);
    add(form);

    form.add(new FeedbackPanel("feedback"));

    form.add(new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

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

      {
        fail("Link " + path + "is an AjaxSubmitLink and " +
          "will not be invoked when AJAX (javascript) is disabled.");
      }

      AjaxSubmitLink link = (AjaxSubmitLink)linkComponent;

      // We cycle through the attached behaviors and select the
      // LAST matching behavior as the one we handle.
      List<IBehavior> behaviors = link.getBehaviors();
      AjaxFormSubmitBehavior ajaxFormSubmitBehavior = null;
      for (IBehavior behavior : behaviors)
      {
        if (behavior instanceof AjaxFormSubmitBehavior)
        {
View Full Code Here

    final Form<Void> form = new Form<Void>("form");
    form.setOutputMarkupId(true);
    add(form);

    form.add(new AjaxSubmitLink("submit")
    {
      private static final long serialVersionUID = 1L;

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

TOP

Related Classes of org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink

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.