Package org.apache.wicket.ajax.form

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


      }
    });
    rangeDateLabel.setOutputMarkupId(true);
    form.add(rangeDateLabel);
   
    rangeDatePicker.add(new AjaxFormSubmitBehavior(form, "onchange") {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onSubmit(AjaxRequestTarget target) {
        target.add(rangeDateLabel);
      }
    });
   
    final DatePicker<String> withDropDownDatePicker = new DatePicker<String>("withDropDownDatePicker", withDropDownDateModel);
    withDropDownDatePicker.setChangeMonth(true);
    withDropDownDatePicker.setChangeYear(true);
    withDropDownDatePicker.setYearRange(new DatePickerYearRange(new Short("-20"), new Short("20"), true));
   
    // Label
    withDropDownDatePicker.setLabel(Model.of("Year/month dropdown"));
    form.add(withDropDownDatePicker);
   
    final Label withDropDownDateLabel = new Label("withDropDownDateLabel", new AbstractReadOnlyModel<String>() {
      private static final long serialVersionUID = 1L;

      @Override
      public String getObject() {
        return withDropDownDateModel.getObject();
      }
    });
    withDropDownDateLabel.setOutputMarkupId(true);
    form.add(withDropDownDateLabel);
   
    withDropDownDatePicker.add(new AjaxFormSubmitBehavior(form, "onchange") {
      private static final long serialVersionUID = 1L;
     
      @Override
      protected void onSubmit(AjaxRequestTarget target) {
        target.add(withDropDownDateLabel);
View Full Code Here

    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

    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

    add(newAjaxFormSubmitBehavior("click"));
  }

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

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

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

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

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

    request.addHeader(WebRequest.HEADER_AJAX_BASE_URL, url.toString());
    request.addHeader(WebRequest.HEADER_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

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

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

      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, "click")
    {
      private static final long serialVersionUID = 1L;

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

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

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

      @Override
      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.