Package org.ajax4jsf.javascript

Examples of org.ajax4jsf.javascript.JSFunction.addParameter()


    parametersMap.put(id + ":sortIndex", sortIndex);
    options.put("parameters", parametersMap);
   
    JSFunction function = AjaxRendererUtils.buildAjaxFunction(grid, context);
    options.put("oncomplete", AjaxFunctionBuilder.getOnComplete(context, grid, AjaxFunctionBuilder.SORT));
    function.addParameter(options);
    String completeFunction = function.toScript() + "; return false;";
   
    return completeFunction;
  }
View Full Code Here


    options.addOption("normalizedId", getNormalizedId(context, grid));
   
    composite.mergeScriptOptions(options, context, grid);
   
    JSFunction function = new JSFunction("new ClientUI.controls.grid.ScrollableGrid");
    function.addParameter(options);
    return function.toScript();
  }
 
  protected String getScriptContributions(FacesContext context, UIScrollableDataTable grid) {
    return composite.getScriptContributions(getJavaScriptVarName(context, grid), context, grid);
View Full Code Here

    @SuppressWarnings("unchecked")
    Map<String, Object> parametersMap = (Map<String, Object>) options.get("parameters");
   
    parametersMap.put(grid.getBaseClientId(context) + ":scroll", "");
    function.addParameter(options);
    String completeFunction = function.toScript()+"; return false;";
   
    return completeFunction;
   
  }
View Full Code Here

        Map attributes = component.getAttributes();
        StringBuffer script = new StringBuffer(" new ");
        // Build ajax function call
        JSFunction submitSuggest = AjaxRendererUtils.buildAjaxFunction(
                component, context, "RichFaces.Suggestion");
  submitSuggest.addParameter(targetId);
        submitSuggest.addParameter(component.getClientId(context));
        submitSuggest.addParameter(component.getAttributes().get("onsubmit"));
        Map options = AjaxRendererUtils.buildEventOptions(context, component);
        options.put("popup", component.getClientId(context));
        for (int i = 0; i < OPTIONS.length; i++) {
View Full Code Here

        StringBuffer script = new StringBuffer(" new ");
        // Build ajax function call
        JSFunction submitSuggest = AjaxRendererUtils.buildAjaxFunction(
                component, context, "RichFaces.Suggestion");
  submitSuggest.addParameter(targetId);
        submitSuggest.addParameter(component.getClientId(context));
        submitSuggest.addParameter(component.getAttributes().get("onsubmit"));
        Map options = AjaxRendererUtils.buildEventOptions(context, component);
        options.put("popup", component.getClientId(context));
        for (int i = 0; i < OPTIONS.length; i++) {
            String option = OPTIONS[i];
View Full Code Here

        // Build ajax function call
        JSFunction submitSuggest = AjaxRendererUtils.buildAjaxFunction(
                component, context, "RichFaces.Suggestion");
  submitSuggest.addParameter(targetId);
        submitSuggest.addParameter(component.getClientId(context));
        submitSuggest.addParameter(component.getAttributes().get("onsubmit"));
        Map options = AjaxRendererUtils.buildEventOptions(context, component);
        options.put("popup", component.getClientId(context));
        for (int i = 0; i < OPTIONS.length; i++) {
            String option = OPTIONS[i];
            Object value = attributes.get(option);
View Full Code Here

        options.put("usingSuggestObjects", suggestionBox.isUsingSuggestObjects());

        // pass "zindex" attribute to js though the "options" attribute
        options.put("zindex", suggestionBox.getZindex());

        submitSuggest.addParameter(options);
        script.append(submitSuggest.toScript()).append(";\n");
        return "Richfaces.onAvailable('" + targetId + "', function() {" + script.toString() + "});";
    }

    /**
 
View Full Code Here

        definition.addParameter("event");
        definition.addParameter("columnId");
        definition.addParameter("menuId");
        JSFunction invocation = new JSFunction(
                "Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
        invocation.addParameter(new JSReference("menuId"));
        invocation.addParameter("show");
        // invocation.addParameter(new JSReference("{'columnId':columnId}"));
        invocation.addParameter(new JSReference("{}"));
        invocation.addParameter(Boolean.FALSE);
View Full Code Here

        definition.addParameter("columnId");
        definition.addParameter("menuId");
        JSFunction invocation = new JSFunction(
                "Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
        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");
View Full Code Here

        definition.addParameter("menuId");
        JSFunction invocation = new JSFunction(
                "Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
        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

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.