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

    ajaxEventBehavior.onRequest();
View Full Code Here

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

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

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

      /**
       *
 
View Full Code Here

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

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

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

      }
    });
    add(new WebMarkupContainer("messages").setMarkupId("messageArea"));
    final Form<Void> f = new Form<Void>("sendForm");
    f.add(new TextArea<String>("message", new PropertyModel<String>(ChatPanel.this, "message")).setOutputMarkupId(true));
    f.add(new Button("send").add(new AjaxFormSubmitBehavior("onclick"){
      private static final long serialVersionUID = -3746739738826501331L;
     
      protected void onSubmit(AjaxRequestTarget target) {
        ChatDao dao = Application.getBean(ChatDao.class);
        ChatMessage m = new ChatMessage();
View Full Code Here

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

    field.add(new AjaxFormSubmitBehavior(form, "onchange"){
      protected void onSubmit(AjaxRequestTarget target)
      {
        target.addComponent(label);
      }
    });
View Full Code Here

    // ajax submit has occurred.
   
    // The AjaxFormSubmitBehavior already calls the onSubmit of the form, all
    // we need to do in the onSubmit(AjaxRequestTarget) handler is do our Ajax
    // specific stuff, like rendering our components.
    commentForm.add(new AjaxFormSubmitBehavior(commentForm, "onsubmit")
    {
      protected IAjaxCallDecorator getAjaxCallDecorator()
      {
        return new AjaxCallDecorator()
        {
View Full Code Here

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

    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

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.