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

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


    final TextField<Integer> field = new TextField<Integer>("textfield",
      new PropertyModel<Integer>(this, "number"));
    field.add(NumberValidator.maximum(20));
    field.setRequired(true);

    StatelessForm<?> statelessForm = new StatelessForm("statelessform")
    {
      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      @Override
      protected void onSubmit()
      {
        info("Submitted text: " + field.getDefaultModelObject());
      }
    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here


    final TextField<Integer> field = new TextField<Integer>("textfield",
      new PropertyModel<Integer>(this, "number"));
    field.add(NumberValidator.maximum(20));
    field.setRequired(true);

    StatelessForm<?> statelessForm = new StatelessForm("statelessform")
    {
      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      @Override
      protected void onSubmit()
      {
        info("Submitted text: " + field.getDefaultModelObject());
      }
    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

    final TextField<Integer> field = new TextField<Integer>("textfield",
      new PropertyModel<Integer>(this, "number"));
    field.add(NumberValidator.maximum(20));
    field.setRequired(true);

    StatelessForm<?> statelessForm = new StatelessForm("statelessform")
    {
      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      @Override
      protected void onSubmit()
      {
        info("Submitted text: " + field.getDefaultModelObject());
      }
    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

  {
    setStatelessHint(true);
    add(new Label("message", new SessionModel()));
    add(new BookmarkablePageLink("indexLink", Index.class));

    StatelessForm statelessForm = new StatelessForm("statelessform")
    {
      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      protected void onSubmit()
      {
        info("Submitted text: " + tf.getModelObject());
      }
    };
    tf = new TextField("textfield", new Model());
    tf.setRequired(true);
    add(statelessForm);
    statelessForm.add(tf);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

    add(actionLink);
    actionLink.add(new Label("linkClickCount", new PropertyModel(this, "linkClickCount")));

    final TextField field = new TextField("textfield", new Model());

    StatelessForm statelessForm = new StatelessForm("statelessform")
    {
      private static final long serialVersionUID = 1L;

      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      protected void onSubmit()
      {
        info("Submitted text: " + field.getModelObject() + ", link click count: " +
          linkClickCount);
      }
    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

    setStatelessHint(true);
    add(new BookmarkablePageLink("indexLink", Index.class));
    final TextField field = new TextField("textfield", new Model());
    field.setRequired(true);

    StatelessForm statelessForm = new StatelessForm("statelessform")
    {
      private static final long serialVersionUID = 1L;

      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      protected void onSubmit()
      {
        info("Submitted text: " + field.getModelObject());
      }
    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

public class Page1 extends WebPage
{

  public Page1()
  {
    add(new StatelessForm("form"));
  }
View Full Code Here

    final TextField<Integer> field = new TextField<Integer>("textfield",
      new PropertyModel<Integer>(this, "number"));
    field.add(new MaximumValidator<Integer>(20));
    field.setRequired(true);

    StatelessForm<?> statelessForm = new StatelessForm("statelessform")
    {
      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      @Override
      protected void onSubmit()
      {
        info("Submitted text: " + field.getDefaultModelObject());
      }
    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

    final TextField<Integer> field = new TextField<Integer>("textfield",
      new PropertyModel<Integer>(this, "number"));
    field.add(new MaximumValidator<Integer>(20));
    field.setRequired(true);

    StatelessForm<?> statelessForm = new StatelessForm("statelessform")
    {
      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      @Override
      protected void onSubmit()
      {
        info("Submitted text: " + field.getDefaultModelObject());
      }
    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

    final TextField<Integer> field = new TextField<Integer>("textfield",
      new PropertyModel<Integer>(this, "number"));
    field.add(new MaximumValidator<Integer>(20));
    field.setRequired(true);

    StatelessForm<?> statelessForm = new StatelessForm("statelessform")
    {
      /**
       * @see org.apache.wicket.markup.html.form.Form#onSubmit()
       */
      @Override
      protected void onSubmit()
      {
        info("Submitted text: " + field.getDefaultModelObject());

        // store the value in page parameters
        getPage().getPageParameters().setNamedParameter(PARAMETER_NAME, number);

        // force redirect, otherwise the listener interface URL would be kept
        getRequestCycle().setResponsePage(getPage());
      }

    };
    statelessForm.add(field);
    add(statelessForm);
    add(new FeedbackPanel("feedback"));
  }
View Full Code Here

TOP

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

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.