Package org.ajax4jsf.javascript

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


   
    JSFunctionDefinition functionDefinition = new JSFunctionDefinition();
   
    JSReference sortEvent = new JSReference("event");
    functionDefinition.addParameter(sortEvent);
    functionDefinition.addToBody(onSortAjaxUpdate(context, grid));
   
    addOption("onSortAjaxUpdate", functionDefinition)
   
  }
 
View Full Code Here


        String onselect = (String) attributes.get("onselect");
        if (null != onselect) {
            JSFunctionDefinition function = new JSFunctionDefinition(
                    "suggestion");
            function.addParameter("event");
            function.addToBody(onselect);

            options.put("onselect", function);

        }
        String onobjectchange = (String) attributes.get("onobjectchange");
View Full Code Here

        }
        String onobjectchange = (String) attributes.get("onobjectchange");
        if (null != onobjectchange) {
            JSFunctionDefinition function = new JSFunctionDefinition(
                    "suggestion","event");
            function.addToBody(onobjectchange);

            options.put("onobjectchange", function);

        }
        if (component.getValueBinding("fetchValue") != null
View Full Code Here

        invocation.addParameter(new JSReference("menuId"));
        invocation.addParameter("show");
        // invocation.addParameter(new JSReference("{'columnId':columnId}"));
        invocation.addParameter(new JSReference("{}"));
        invocation.addParameter(Boolean.FALSE);
        definition.addToBody(invocation.toScript()).addToBody(";\n");
        return definition;
    }

}
View Full Code Here

        parameters.remove(clientId);
        parameters.put(dropTargetScriptId, dropTargetScriptId);
      }
    }
   
    definition.addToBody("var dragParams = drag.getParameters();");
   
    String dragSourceScriptId = column.getClientId(context) + ":"+ TableDragDropRenderer.DRAG_SOURCE_SCRIPT_ID;
    definition.addToBody(
      "var source = dragParams['"+ DraggableRendererContributor.DRAG_SOURCE_ID +"'];" +
      "if (source != \"" + dragSourceScriptId + "\"){"//send request only if drag column in not equals to drop column
View Full Code Here

    }
   
    definition.addToBody("var dragParams = drag.getParameters();");
   
    String dragSourceScriptId = column.getClientId(context) + ":"+ TableDragDropRenderer.DRAG_SOURCE_SCRIPT_ID;
    definition.addToBody(
      "var source = dragParams['"+ DraggableRendererContributor.DRAG_SOURCE_ID +"'];" +
      "if (source != \"" + dragSourceScriptId + "\"){"//send request only if drag column in not equals to drop column
    );
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
View Full Code Here

    String dragSourceScriptId = column.getClientId(context) + ":"+ TableDragDropRenderer.DRAG_SOURCE_SCRIPT_ID;
    definition.addToBody(
      "var source = dragParams['"+ DraggableRendererContributor.DRAG_SOURCE_ID +"'];" +
      "if (source != \"" + dragSourceScriptId + "\"){"//send request only if drag column in not equals to drop column
    );
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + 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, dragParams);");
View Full Code Here

    definition.addToBody(
      "var source = dragParams['"+ DraggableRendererContributor.DRAG_SOURCE_ID +"'];" +
      "if (source != \"" + dragSourceScriptId + "\"){"//send request only if drag column in not equals to drop column
    );
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + 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, dragParams);");
    if (preSendAjaxRequestFunction != null){
View Full Code Here

      "if (source != \"" + dragSourceScriptId + "\"){"//send request only if drag column in not equals to drop column
    );
    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + 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, dragParams);");
    if (preSendAjaxRequestFunction != null){
      definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
    }
View Full Code Here

    definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
    definition.addToBody("options.parameters['" + 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, dragParams);");
    if (preSendAjaxRequestFunction != null){
      definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
    }
    definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
   
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.