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

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


    form.add(new AjaxButton("ajaxButton")
    {

    });

    form.add(new SubmitLink("link"));

    form.add(new AjaxSubmitLink("ajaxlink")
    {

    });
View Full Code Here


        add(form);
        form.add(new TextField("email", new PropertyModel(input, "email")).setRequired(true).
                add(EmailAddressValidator.getInstance()));
//        form.add(new PasswordTextField("password", new PropertyModel(input, "password")).add(StringValidator.minimumLength(6)));

        form.add(new SubmitLink("submitbtn").add(new AttributeAppender("value", true, subLabel, " ")));

        acceptToS.add(new CheckBox("cb", new PropertyModel(input, "acceptTos")).setRequired(true));
        form.add(acceptToS);
    }
View Full Code Here

    /*
     * If the link is a submitlink then we pretend to have clicked it
     */
    else if (linkComponent instanceof SubmitLink)
    {
      SubmitLink submitLink = (SubmitLink)linkComponent;

      String pageRelativePath = submitLink.getInputName();
      getParametersForNextRequest().put(pageRelativePath, new String[] { "x" });

      Form<?> form = submitLink.getForm();
      form.visitFormComponents(new FormComponent.IVisitor()
      {
        public Object formComponent(IFormVisitorParticipant formComponent)
        {
          FormComponent<?> component = (FormComponent<?>)formComponent;
          if (getParametersForNextRequest().containsKey(component.getInputName()) == false)
          {
            getParametersForNextRequest().put(component.getInputName(),
              new String[] { component.getDefaultModelObjectAsString() });
          }

          return IVisitor.CONTINUE_TRAVERSAL;
        }
      });

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;
View Full Code Here

    /*
     * If the link is a submitlink then we pretend to have clicked it
     */
    else if (linkComponent instanceof SubmitLink)
    {
      SubmitLink submitLink = (SubmitLink)linkComponent;

      String pageRelativePath = submitLink.getInputName();
      request.getPostParameters().setParameterValue(pageRelativePath, "x");

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;
View Full Code Here

    /*
     * If the link is a submitlink then we pretend to have clicked it
     */
    else if (linkComponent instanceof SubmitLink)
    {
      SubmitLink submitLink = (SubmitLink)linkComponent;

      String pageRelativePath = submitLink.getInputName();
      request.getPostParameters().setParameterValue(pageRelativePath, "x");

      submitForm(submitLink.getForm().getPageRelativePath());
    }
    // if the link is a normal link (or ResourceLink)
    else if (linkComponent instanceof AbstractLink)
    {
      AbstractLink link = (AbstractLink)linkComponent;
View Full Code Here

        {
          setSelected((Contact)ActionPanel.this.getDefaultModelObject());
        }
      });

      SubmitLink removeLink = new SubmitLink("remove", form)
      {
        @Override
        public void onSubmit()
        {
          Contact contact = (Contact)ActionPanel.this.getDefaultModelObject();
          info("Removed contact " + contact);
          DatabaseLocator.getDatabase().delete(contact);
        }
      };
      removeLink.setDefaultFormProcessing(false);
      add(removeLink);
    }
View Full Code Here

    // Add a form with 2 SubmitLinks that can be called
    Form<?> form = new Form("form");
    add(form);

    SubmitLink internal = new SubmitLink("internal")
    {
      @Override
      public void onSubmit()
      {
        info("internal onsubmit");
      }
    };
    form.add(internal);

    SubmitLink external = new SubmitLink("external", form)
    {
      @Override
      public void onSubmit()
      {
        info("external onsubmit");
View Full Code Here

    form.add(new DropDownChoice<String>("domain", Arrays.asList("Wicket", "Tapestry", "JSF",
      ".Net")));
    form.add(new CheckBox("rememberMe"));
    form.add(new WebMarkupContainer("loginZonderTokenContainer").add(new CheckBox(
      "loginZonderToken")));
    form.add(new SubmitLink("aanmelden"));
    add(form);
  }
View Full Code Here

      {
        submitedByAjaxBehavior = true;
      }
    });
    add(textField);
    add(new SubmitLink("ajaxSubmitLink")
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onSubmit()
View Full Code Here

    public TestPage()
    {
      Form<?> form = new Form<Void>("form");
      add(form);
      form.add(new TextField<String>("text", Model.of(""), String.class));
      form.add(new SubmitLink("submit"));
    }
View Full Code Here

TOP

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

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.