Package org.ajax4jsf.javascript

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


                        + ":" + CHANGE_COL_VISIBILITY, dataColumn.getId());

                JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(
                        dataColumn, context);
                dropFunction.addParameter(requestOpts);
                actionScript = dropFunction.toScript();
            }// if

            writer.startElement("li", dataColumn);
            writer.writeAttribute(HTML.class_ATTRIBUTE, "dt-menu-list-item"
                    + (columnVisible ? " dt-menu-item-checked" : ""), null);
View Full Code Here


        }
        // Replace parameter value to reference.
        parameters.put(name, reference);
      }
    }
    func.addToBody(ajaxFunction.toScript());
    func.appendScript(script);
    return script.toString();
  }
}
View Full Code Here

     
      ResponseWriter writer = context.getResponseWriter();
     
      writer.startElement(HTML.SCRIPT_ELEM, component);
      getUtils().writeAttribute(writer, HTML.TYPE_ATTR, "text/javascript");
      writer.writeText(function.toScript(), component, null);
      writer.endElement(HTML.SCRIPT_ELEM);
    }
  }
}
View Full Code Here

   
    ajaxFunction.addParameter(options);

    JSFunctionDefinition function = new JSFunctionDefinition("uid", "action", "callback");
    function.addParameter("event");
    function.addToBody(ajaxFunction.toScript());

    return function.toScript();
  }

  /**
 
View Full Code Here

        scriptOptions.addOption(ON_GROUP_TOGGLE_FUNCTION,
                getOnGroupToggleFunctionDef(context, table));
        scriptOptions.addOption("minColumnWidth", MIN_COLUMN_WIDTH);
        composite.mergeScriptOptions(scriptOptions, context, table);
        function.addParameter(scriptOptions);
        return function.toScript();
    }

    protected JSFunctionDefinition getShowMenuFunction(FacesContext context,
            UIDataTable table) {
        return new RichTableMenuRenderer().createShowMenuEventFunction();
View Full Code Here

            "}"
        );
        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
                context);
        ajaxFunction.addParameter(new JSReference("options"));
        definition.addToBody(ajaxFunction.toScript()).addToBody(";\n");
        return definition;
    }// getSortFunctionDef

    protected JSFunction getSortFunction(FacesContext context, UIDataTable table) {
        String id = table.getClientId(context);
View Full Code Here

        definition.addToBody("options.parameters['" + GROUP_FILTER_PARAMETER
                + "'] = columnId;\n");
        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
                context);
        ajaxFunction.addParameter(new JSReference("options"));
        definition.addToBody(ajaxFunction.toScript()).addToBody(";\n");
        return definition;
    }// getGroupFunctionDef
   
    protected JSFunctionDefinition getOnGroupToggleFunctionDef(
            FacesContext context, UIDataTable table) {
View Full Code Here

        definition
                .addToBody("options.parameters['groupIndex'] = groupIndex;\n");
        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
                context);
        ajaxFunction.addParameter(new JSReference("options"));
        definition.addToBody(ajaxFunction.toScript()).addToBody(";\n");
        return definition;
    }// getOnGroupToggleFunctionDef

    protected JSFunctionDefinition getOnResizeFunctionDef(FacesContext context,
            UIDataTable table) {
View Full Code Here

                .addToBody("options.parameters['columnWidths'] = columnWidths;\n");

        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
                context);
        ajaxFunction.addParameter(new JSReference("options"));
        definition.addToBody(ajaxFunction.toScript()).addToBody(";\n");
        return definition;
    }

    protected JSFunction getChangeColumnVisibilityFunction(
            FacesContext context, UIDataTable table) {
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.addToBody("};");
   
    definition.appendScript(result);
    result.append(";");
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.