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

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


    form.add(checkGroup);

    checkGroup.add(new Check<Integer>("check1", new Model<Integer>(1)));
    checkGroup.add(new Check<Integer>("check2", new Model<Integer>(2)));

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

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


  {
    MockPojo mockPojo = new MockPageWithFormAndLink.MockPojo();
    mockPojo.setName("Mock name");

    final MockPageWithFormAndContainedLink page = new MockPageWithFormAndContainedLink(mockPojo);
    page.addLink(new AjaxSubmitLink("link")
    {
      private static final long serialVersionUID = 1L;

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

  {
    MockPojo mockPojo = new MockPageWithFormAndLink.MockPojo();
    mockPojo.setName("Mock name");

    final MockPageWithFormAndLink page = new MockPageWithFormAndLink(mockPojo);
    AjaxSubmitLink link = new AjaxSubmitLink("link", page.getForm())
    {
      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;

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

      submitAjaxFormSubmitBehavior(link,
        (AjaxFormSubmitBehavior)WicketTesterHelper.findAjaxEventBehavior(link, "onclick"));
    }
View Full Code Here

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

      AjaxSubmitLink link = (AjaxSubmitLink)linkComponent;

      String inputName = ((IFormSubmittingComponent)link).getInputName();
      Map<String, String[]> requestParams = getParametersForNextRequest();
      requestParams.put(inputName, new String[] { "x" });

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

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

      AjaxSubmitLink link = (AjaxSubmitLink)linkComponent;

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

      submitAjaxFormSubmitBehavior(link,
        (AjaxFormSubmitBehavior)WicketTesterHelper.findAjaxEventBehavior(link, "onclick"));
    }
View Full Code Here

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

      AjaxSubmitLink link = (AjaxSubmitLink)linkComponent;

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

      submitAjaxFormSubmitBehavior(link,
        (AjaxFormSubmitBehavior)WicketTesterHelper.findAjaxEventBehavior(link, "onclick"));
    }
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 behaviors = link.getBehaviors();
      AjaxFormSubmitBehavior ajaxFormSubmitBehavior = null;
      for (Iterator iter = behaviors.iterator(); iter.hasNext();)
      {
        Object behavior = iter.next();
        if (behavior instanceof AjaxFormSubmitBehavior)
View Full Code Here

    form.add(checkGroup);

    checkGroup.add(new Check("check1", new Model(new Integer(1))));
    checkGroup.add(new Check("check2", new Model(new Integer(2))));

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

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

  {
    MockPojo mockPojo = new MockPageWithFormAndLink.MockPojo();
    mockPojo.setName("Mock name");

    final MockPageWithFormAndLink page = new MockPageWithFormAndLink(mockPojo);
    AjaxSubmitLink link = new AjaxSubmitLink("link", page.getForm())
    {
      private static final long serialVersionUID = 1L;

      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.