Package org.apache.wicket.ajax.form

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


    }

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

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

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

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

      private static final long serialVersionUID = 1L;

      @Override
View Full Code Here

  public AjaxButton(String id, final Form<?> form)
  {
    super(id);
    this.form = form;

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

      /**
       *
 
View Full Code Here

    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

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

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

      private static final long serialVersionUID = 1L;

      protected void onSubmit(AjaxRequestTarget target)
View Full Code Here

  public AjaxButton(String id, final Form form)
  {
    super(id);
    this.form = form;

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

      private static final long serialVersionUID = 1L;

      protected void onSubmit(AjaxRequestTarget target)
View Full Code Here

      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

      requestCycle = (WebRequestCycle)RequestCycle.get();

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

    form.add(new TextField("name"));

    // The Event behavior
    WebComponent eventComponent = new WebComponent(EVENT_COMPONENT);
    add(eventComponent);
    eventComponent.add(new AjaxFormSubmitBehavior(form, "onclick")
    {
      private static final long serialVersionUID = 1L;

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

TOP

Related Classes of org.apache.wicket.ajax.form.AjaxFormSubmitBehavior

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.