Package org.ajax4jsf.javascript

Examples of org.ajax4jsf.javascript.JSFunctionDefinition.addToBody()


  if (event != null) {
      event = event.trim();
      if (event.length() != 0) {
    JSFunctionDefinition function = new JSFunctionDefinition();
    function.addParameter("event");
    function.addToBody(event);
    result = function;
      }
  }

  return ScriptUtils.toScript(result);
View Full Code Here


      event = event.trim();

      if (event.length() != 0) {
        JSFunctionDefinition function = new JSFunctionDefinition();
        function.addParameter("event");
        function.addToBody(event);

        result = function;
      }
    }
View Full Code Here

        parameters.put(dropTargetScriptId, dropTargetScriptId);
      }
    }
   
    if (preSendAjaxRequestFunction != null){
      definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
    }
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + org.richfaces.renderkit.DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
   
    if (onAjaxCompleteFunction != null)   
View Full Code Here

    }
   
    if (preSendAjaxRequestFunction != null){
      definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
    }
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + org.richfaces.renderkit.DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
   
    if (onAjaxCompleteFunction != null)   
      definition.addToBody("options['" + AjaxRendererUtils.ONCOMPLETE_ATTR_NAME + "'] = " + onAjaxCompleteFunction.toScript() + ";");
    //TODO remove as legacy
View Full Code Here

   
    if (preSendAjaxRequestFunction != null){
      definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
    }
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + org.richfaces.renderkit.DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
   
    if (onAjaxCompleteFunction != null)   
      definition.addToBody("options['" + AjaxRendererUtils.ONCOMPLETE_ATTR_NAME + "'] = " + onAjaxCompleteFunction.toScript() + ";");
    //TODO remove as legacy
    definition.addToBody("Object.extend(options.parameters,drag.getParameters());");
View Full Code Here

    }
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + org.richfaces.renderkit.DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
   
    if (onAjaxCompleteFunction != null)   
      definition.addToBody("options['" + AjaxRendererUtils.ONCOMPLETE_ATTR_NAME + "'] = " + onAjaxCompleteFunction.toScript() + ";");
    //TODO remove as legacy
    definition.addToBody("Object.extend(options.parameters,drag.getParameters());");
    definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
   
    JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(column, context);
View Full Code Here

    definition.addToBody("options.parameters['" + org.richfaces.renderkit.DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
   
    if (onAjaxCompleteFunction != null)   
      definition.addToBody("options['" + AjaxRendererUtils.ONCOMPLETE_ATTR_NAME + "'] = " + onAjaxCompleteFunction.toScript() + ";");
    //TODO remove as legacy
    definition.addToBody("Object.extend(options.parameters,drag.getParameters());");
    definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
   
    JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(column, context);
    dropFunction.addParameter(new JSReference("options"));
   
View Full Code Here

   
    if (onAjaxCompleteFunction != null)   
      definition.addToBody("options['" + AjaxRendererUtils.ONCOMPLETE_ATTR_NAME + "'] = " + onAjaxCompleteFunction.toScript() + ";");
    //TODO remove as legacy
    definition.addToBody("Object.extend(options.parameters,drag.getParameters());");
    definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
   
    JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(column, context);
    dropFunction.addParameter(new JSReference("options"));
   
    definition.addToBody(dropFunction.toScript()).addToBody(";");
View Full Code Here

    definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
   
    JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(column, context);
    dropFunction.addParameter(new JSReference("options"));
   
    definition.addToBody(dropFunction.toScript()).addToBody(";");
    definition.appendScript(result);
    result.append(";");

    return result.toString();
  }
View Full Code Here

        attribut = attributes.get("onselectionchange");
        if (attribut == null) {
            attribut = "";
        }
        JSFunctionDefinition function = new JSFunctionDefinition();
        function.addToBody(attribut);
        scriptOptions.addEventHandler("onselectionchange", function);
        return scriptOptions;
    }

    public void encode(FacesContext context, UIComponent component)
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.