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

    add(newAjaxFormSubmitBehavior("click"));
  }

  protected AjaxFormSubmitBehavior newAjaxFormSubmitBehavior(String event)
  {
    return new AjaxFormSubmitBehavior(form, event)
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onError(AjaxRequestTarget target)
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);
     
      // mark behavior's component as the form submitter,
      String name = Form.getRootFormRelativeId(new PropertyModel<Component>(behavior,
View Full Code Here

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

    return super.add(childs);
  }

  private void ajaxify(final WizardButton button)
  {
    button.add(new AjaxFormSubmitBehavior("click")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
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

   */
  public AjaxSubmitLink(String id, final Form<?> form)
  {
    super(id, form);

    add(new AjaxFormSubmitBehavior(form, "onclick")
    {

      private static final long serialVersionUID = 1L;

      @Override
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, "onchange")
    {
      @Override
      protected void onSubmit(AjaxRequestTarget target)
      {
        BookmarkablePageRequestHandler bookmarkablePageRequestHandler = new BookmarkablePageRequestHandler(
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
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.