Examples of onPrecondition()


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

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

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

        CharSequence dynamicExtraParameters = "var result = [],"
          + "evtType=attrs.event.type;"
          + "if (evtType === 'keyup') { result.push( { name: 'save', value: false } ); }"
          + "else { result = Wicket.Form.serializeElement(attrs.c); result.push( { name: 'save', value: true } ); }"
View Full Code Here

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

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

  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

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

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

        CharSequence dynamicExtraParameters = "var result,"
          + "evtType=attrs.event.type;"
          + "if (evtType === 'keyup') { result = { 'save': false }; }"
          + "else { result = { 'save': true }; }"
View Full Code Here

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

  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

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

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

          + "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

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

                "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

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