Package org.apache.wicket.ajax.form

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


      private static final long serialVersionUID = 3171252669473438834L;
      {
        add(new TextField<String>("text", new PropertyModel<String>(UserSearchPanel.this, "text")));
        add(new TextField<String>("offer", new PropertyModel<String>(UserSearchPanel.this, "offer")));
        add(new TextField<String>("search", new PropertyModel<String>(UserSearchPanel.this, "search")));
        add(new AjaxFormSubmitBehavior(this, "onsubmit") {
          private static final long serialVersionUID = -5767210068168188960L;

          @Override
          protected void onSubmit(AjaxRequestTarget target) {
            searched = true;
View Full Code Here


      public List<FileUpload> getObject() {
        return null;
      }
    }));
    form.add(new UploadProgressBar("progress", form, fileUploadField));
    fileUploadField.add(new AjaxFormSubmitBehavior(form, "onchange") {
      private static final long serialVersionUID = 2160216679027859231L;

      @Override
      protected void onSubmit(AjaxRequestTarget target) {
        FileUpload fu = fileUploadField.getFileUpload();
View Full Code Here

    add(navigator);
    langForm = new LangForm("langForm", listContainer, this);
    fileUploadField = new FileUploadField("fileInput");
    langForm.add(fileUploadField);
    langForm.add(new UploadProgressBar("progress", langForm, fileUploadField));
    fileUploadField.add(new AjaxFormSubmitBehavior(langForm, "onchange") {
      private static final long serialVersionUID = 2160216679027859231L;

      @Override
      protected void onSubmit(AjaxRequestTarget target) {
        FileUpload download = fileUploadField.getFileUpload();
View Full Code Here

          // repaint the feedback panel so errors are shown
          target.add(uploadFeedback);
        }
      });

      add(fileUploadField.add(new AjaxFormSubmitBehavior(this, "onchange") {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
          FileUpload upload = fileUploadField.getFileUpload();
View Full Code Here

      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)
        {
          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;
      submitAjaxFormSubmitBehavior(component, ajaxFormSubmitBehavior);
    }

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

    add(navigator);
    langForm = new LangForm("langForm", listContainer, this);
    fileUploadField = new FileUploadField("fileInput");
    langForm.add(fileUploadField);
    langForm.add(new UploadProgressBar("progress", langForm, fileUploadField));
    fileUploadField.add(new AjaxFormSubmitBehavior(langForm, "onchange") {
      private static final long serialVersionUID = 2160216679027859231L;

      @Override
      protected void onSubmit(AjaxRequestTarget target) {
        FileUpload download = fileUploadField.getFileUpload();
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

    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

      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

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.