Examples of AjaxSubmitLink


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

    form.add(new TextField("city"));
    form.add(new TextField("state"));
    form.add(new TextField("zip"));

    // add the child submit button
    add(new AjaxSubmitLink("childSubmitButton", form)
    {
      @Override
      public void onSubmit(AjaxRequestTarget target, Form<?> form)
      {
        ((ChildModel)getPanelInstance().getDefaultModelObject()).submittedCalled(target);
View Full Code Here

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

      }
    });

    form.add(new SubmitLink("link"));

    form.add(new AjaxSubmitLink("ajaxlink")
    {
      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form)
      {
        MockFormSubmitsPage.this.onAjaxSubmitLinkSubmit(target, form);
View Full Code Here

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

      {
        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<IBehavior> behaviors = link.getBehaviors();
      AjaxFormSubmitBehavior ajaxFormSubmitBehavior = null;
      for (IBehavior behavior : behaviors)
      {
        if (behavior instanceof AjaxFormSubmitBehavior)
        {
View Full Code Here

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

      {
        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

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

      TextField<String> secondField = new TextField<String>("second");
      add(firstField);
      add(secondField);

      add(new EqualInputValidator(firstField, secondField));
      add(new AjaxSubmitLink("ajaxSubmit", this)
      {
        private static final long serialVersionUID = 1L;

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

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

      {
        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

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

      {
        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

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

    final MultiLineLabel result = new MultiLineLabel("result", new Model<String>());
    result.setOutputMarkupId(true);
    add(result);

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

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form)
      {
        CharSequence pageHtml = renderPage(TemplateBasedOnPage.class);

        updateResult(result, pageHtml, target);
        target.add(feedback);
      }

      @Override
      protected void onError(AjaxRequestTarget target, Form<?> form)
      {
        target.add(feedback);
      }
    };

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

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form)
      {
        CharSequence panelHtml = renderPanel(new MailTemplatePanel(DummyPage.COMP_ID,
          new PropertyModel<String>(MailTemplate.this, "name")));

        updateResult(result, panelHtml, target);
        target.add(feedback);
      }

      @Override
      protected void onError(AjaxRequestTarget target, Form<?> form)
      {
        target.add(feedback);
      }
    };

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

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

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

    if (type.getName().equals("AUDIO")) {
      // Audio fragment does not by default include a form so title can be saved.
      Form<Response> form = new Form<Response>("form", model);
      editor.add(form);
      // Replace standard audio "save" link with one that also saves the form.
      AjaxSubmitLink saveLink = new AjaxSubmitLink("save", form) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
          // This gets invoked when user clicks "save" button.
          // First, save the title to datastore (creating Response if necessary).
          responseService.saveResponseWithoutData(model);
          // Then get the audio data streamed back to the server
          target.appendJavascript(((AbstractAudioRecorder)editor.get("applet")).generateJavascriptMessage("SAVE"));
        }
       
      };
      saveLink.setOutputMarkupId(true);
      editor.replace(saveLink);     
    }
   
    ((Form<?>)editor.get("form")).add(new TitleFragment("titleFragment", model));
   
View Full Code Here

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

      periodChoiceMove = new PeriodChoice("newPeriod", ISISession.get().getCurrentPeriodModel());
      add(periodChoiceMove);
      FeedbackPanel f = new FeedbackPanel("feedback", new ContainerFeedbackMessageFilter(this));
      add(f);
     
      AjaxSubmitLink moveLink = new AjaxSubmitLink("moveLink"){
        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
          ManageClasses.this.visitChildren(EditLink.class, EditLink.getVisitor(target, true));
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.