Package org.apache.wicket.ajax.attributes

Examples of org.apache.wicket.ajax.attributes.AjaxCallListener.onPrecondition()


  private void updateAjaxAttributesBackwardCompatibility(final AjaxRequestAttributes attributes)
  {
    AjaxCallListener backwardCompatibleAjaxCallListener = new AjaxCallListener();
    backwardCompatibleAjaxCallListener.onSuccess(getSuccessScript());
    backwardCompatibleAjaxCallListener.onFailure(getFailureScript());
    backwardCompatibleAjaxCallListener.onPrecondition(getPreconditionScript());
    attributes.getAjaxCallListeners().add(backwardCompatibleAjaxCallListener);

    AjaxChannel channel = getChannel();
    if (channel != null)
    {
View Full Code Here


            + "evtType=attrs.event.type,"
            + "ret=false;"
            + "if(evtType==='blur' || evtType==='change' || (evtType==='keyup' && kc===27)) ret = true;"
            + "return ret;";
        AjaxCallListener ajaxCallListener = new AjaxCallListener();
        ajaxCallListener.onPrecondition(precondition);
        attributes.getAjaxCallListeners().add(ajaxCallListener);
      }
    });
    return editor;
  }
View Full Code Here

          + "evtType=attrs.event.type,"
          + "ret=false;"
          + "if(evtType==='blur' || (evtType==='keyup' && (kc===27 || kc===13))) ret = true;"
          + "return ret;";
        AjaxCallListener ajaxCallListener = new AjaxCallListener();
        ajaxCallListener.onPrecondition(precondition);
        attributes.getAjaxCallListeners().add(ajaxCallListener);

      }
    });
    return editor;
View Full Code Here

                "evtType=attrs.event.type,"+
                "ret=false;"+
                "if(evtType==='blur' || (evtType==='keyup' && (kc===27))) ret = true;"+
                "return ret;";
        AjaxCallListener ajaxCallListener = new AjaxCallListener();
        ajaxCallListener.onPrecondition(precondition);
        attributes.getAjaxCallListeners().add(ajaxCallListener);
      }
    });
    return editor;
  }
View Full Code Here

  public void renderAjaxAttributes()
  {
    AjaxRequestAttributes attributes = new AjaxRequestAttributes();

    AjaxCallListener listener = new AjaxCallListener();
    listener.onPrecondition("return somePrecondition();");
    listener.onBefore("alert('Before!');");
    listener.onAfter("alert('After!');");
    listener.onSuccess("alert('Success!');");
    listener.onFailure("alert('Failure!');");
    listener.onComplete("alert('Complete!');");
View Full Code Here

  private void updateAjaxAttributesBackwardCompatibility(final AjaxRequestAttributes attributes)
  {
    AjaxCallListener backwardCompatibleAjaxCallListener = new AjaxCallListener();
    backwardCompatibleAjaxCallListener.onSuccess(getSuccessScript());
    backwardCompatibleAjaxCallListener.onFailure(getFailureScript());
    backwardCompatibleAjaxCallListener.onPrecondition(getPreconditionScript());
    attributes.getAjaxCallListeners().add(backwardCompatibleAjaxCallListener);

    AjaxChannel channel = getChannel();
    if (channel != null)
    {
View Full Code Here

        CharSequence columnParameter = "return {'column': Wicket.$(attrs.c).imxtClickedColumn}";
        attributes.getDynamicExtraParameters().add(columnParameter);

        CharSequence precondition = "return InMethod.XTable.canSelectRow(attrs.event);";
        AjaxCallListener ajaxCallListener = new AjaxCallListener();
        ajaxCallListener.onPrecondition(precondition);
        attributes.setAllowDefault(true);
        attributes.getAjaxCallListeners().add(ajaxCallListener);
      }
     
      @Override
View Full Code Here

      @Override
      protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
      {
        super.updateAjaxAttributes(attributes);
        AjaxCallListener listener = new AjaxCallListener();
        listener.onPrecondition("if(!confirm('Do you really want to delete?')){return false;}");
        attributes.getAjaxCallListeners().add(listener);
      }

      @SuppressWarnings("unchecked")
      @Override
View Full Code Here

  protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
  {
    super.updateAjaxAttributes(attributes);
    attributes.setMethod(AjaxRequestAttributes.Method.POST);
    AjaxCallListener ajaxCallListener = new AjaxCallListener();
    ajaxCallListener.onPrecondition("return Wicketstuff.fileapi.supports(this)&&Wicket.$('" +
      getComponent().getMarkupId() + "') != null;");

    attributes.getDynamicExtraParameters().add("return Wicketstuff.fileapi.fileFieldToPostBody(Wicket.$(attrs.c));");
  }
View Full Code Here

  private void updateAjaxAttributesBackwardCompatibility(final AjaxRequestAttributes attributes)
  {
    AjaxCallListener backwardCompatibleAjaxCallListener = new AjaxCallListener();
    backwardCompatibleAjaxCallListener.onSuccess(getSuccessScript());
    backwardCompatibleAjaxCallListener.onFailure(getFailureScript());
    backwardCompatibleAjaxCallListener.onPrecondition(getPreconditionScript());
    attributes.getAjaxCallListeners().add(backwardCompatibleAjaxCallListener);

    AjaxChannel channel = getChannel();
    if (channel != null)
    {
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.