Examples of AjaxFormSubmitBehavior


Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

    request.addHeader("Wicket-Ajax-BaseURL", url.toString());
    request.addHeader("Wicket-Ajax", "true");

    if (behavior instanceof AjaxFormSubmitBehavior)
    {
      AjaxFormSubmitBehavior formSubmitBehavior = (AjaxFormSubmitBehavior)behavior;
      Form<?> form = formSubmitBehavior.getForm();
      getRequest().setUseMultiPartContentType(form.isMultiPart());
      serializeFormToRequest(form);
    }

    processRequest();
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

    final Label label = new Label("selectedValue", field.getDefaultModel());
    label.setOutputMarkupId(true);
    form.add(label);

    field.add(new AjaxFormSubmitBehavior(form, "change")
    {
      @Override
      protected void onSubmit(AjaxRequestTarget target)
      {
        BookmarkablePageRequestHandler bookmarkablePageRequestHandler = new BookmarkablePageRequestHandler(
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

  public AjaxFallbackButton(String id, IModel<String> model, Form<?> form)
  {
    super(id, model);
    mForm = form;

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

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

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

      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)
        {
          AjaxFormSubmitBehavior submitBehavior = (AjaxFormSubmitBehavior)behavior;
          ajaxFormSubmitBehavior = submitBehavior;
        }
      }

      String failMessage = "No form submit behavior found on the submit link. Strange!!";
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

    }

    // If the event is an FormSubmitBehavior then also "submit" the form
    if (ajaxEventBehavior instanceof AjaxFormSubmitBehavior)
    {
      AjaxFormSubmitBehavior ajaxFormSubmitBehavior = (AjaxFormSubmitBehavior)ajaxEventBehavior;
      submitAjaxFormSubmitBehavior(component, ajaxFormSubmitBehavior);
    }

    // process the event
    ajaxEventBehavior.onRequest();
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

    request.addHeader("Wicket-Ajax-BaseURL", url.toString());
    request.addHeader("Wicket-Ajax", "true");

    if (behavior instanceof AjaxFormSubmitBehavior)
    {
      AjaxFormSubmitBehavior formSubmitBehavior = (AjaxFormSubmitBehavior)behavior;
      Form<?> form = formSubmitBehavior.getForm();
      getRequest().setUseMultiPartContentType(form.isMultiPart());
      serializeFormToRequest(form);
    }

    processRequest();
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

  private static final long serialVersionUID = 1L;

  public MyForm(String id) {
    super(id);
    add(new AttributeAppender("onsubmit", true, new Model<String>("return validateMyForm()"), ";"));
    add(new AjaxFormSubmitBehavior(this, "onclick") {

      private static final long serialVersionUID = 1L;

      @Override
      protected void onError(AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

  public MyForm(String id) {
    super(id);
    add(CSSPackageResource.getHeaderContribution(MyForm.class, MyForm.class.getSimpleName() + ".css"));
    add(JavascriptPackageResource.getHeaderContribution(MyForm.class, MyForm.class.getSimpleName() + ".js"));
    add(new AttributeAppender("onsubmit", true, new Model<String>("return validateMyForm()"), ";"));
    add(new AjaxFormSubmitBehavior(this, "onclick") {

      private static final long serialVersionUID = 1L;

      @Override
      protected void onError(AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

      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)
        {
          AjaxFormSubmitBehavior submitBehavior = (AjaxFormSubmitBehavior)behavior;
          ajaxFormSubmitBehavior = submitBehavior;
        }
      }

      String failMessage = "No form submit behavior found on the submit link. Strange!!";
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

    }

    // If the event is an FormSubmitBehavior then also "submit" the form
    if (ajaxEventBehavior instanceof AjaxFormSubmitBehavior)
    {
      AjaxFormSubmitBehavior ajaxFormSubmitBehavior = (AjaxFormSubmitBehavior)ajaxEventBehavior;
      submitAjaxFormSubmitBehavior(ajaxFormSubmitBehavior);
    }

    ajaxEventBehavior.onRequest();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.