Examples of toScript()


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

      options.addOption("style");
      options.addOption("selectStyle");
      options.addOption("iconClass");
      options.addOption("disabled", Boolean.valueOf(disabled));
      function.addParameter(options);
      return function.toScript();
    }
    return "";
  }
 
  public boolean getRendersChildren() {
View Full Code Here

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

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

        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

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

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

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

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

        Object eventHandler = ScriptHashVariableWrapper.eventHandler.wrap("abc");

        assertTrue(eventHandler instanceof JSFunctionDefinition);

        JSFunctionDefinition handlerFunction = (JSFunctionDefinition) eventHandler;
        assertEquals("function(event){abc}", dehydrate(handlerFunction.toScript()));

        Object arrayObject = ScriptHashVariableWrapper.asArray.wrap("header, footer");
        assertEquals("[\"header\",\"footer\"]", dehydrate(ScriptUtils.toScript(arrayObject)));
    }
View Full Code Here

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

    if (script != null && !script.equals("")) {
      JSFunctionDefinition onEventDefinition = new JSFunctionDefinition();
      onEventDefinition.addParameter("event");
      onEventDefinition.addToBody(script);
      writer.writeText(eventName + ": "
          + onEventDefinition.toScript(), null);
    }else{
      writer.writeText(eventName + ": ''", null);
    }
  }
 
View Full Code Here

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

      JSFunctionDefinition onPageChangeDef = new JSFunctionDefinition("event");
      onPageChangeDef.addToBody(onPageChange);
      onPageChangeDef.addToBody("; return true;");

      definition.addToBody("if (");
      definition.addToBody(onPageChangeDef.toScript());
      definition.addToBody("(event)) {");
      definition.addToBody(buffer.toString());
      definition.addToBody("}");
  } else {
      definition.addToBody(buffer.toString());
View Full Code Here

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

    JSFunctionDefinition function = new JSFunctionDefinition("uid");
    function.addParameter("formId");
    function.addParameter("event");
    function.addToBody(ajaxFunction.toScript());

    return function.toScript();
  }

  /**
   * Return accepted types map
   *
 
View Full Code Here

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

    JSReference requestValue = new JSReference("requestValue");
    ajaxFunction.addParameter(options);
    JSFunctionDefinition definition = new JSFunctionDefinition();
    definition.addParameter(requestValue);
    definition.addToBody(ajaxFunction);
    writer.write(definition.toScript());
  }

  public void writeEventHandlerFunction(FacesContext context,
      UIComponent component, String eventName) throws IOException {
View Full Code Here

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

    if (script != null && !script.equals("")) {
      JSFunctionDefinition onEventDefinition = new JSFunctionDefinition();
      onEventDefinition.addParameter("event");
      onEventDefinition.addToBody(script);
      writer.writeText(",\n" + eventName + ": "
          + onEventDefinition.toScript(), null);
    }
  }

  public String getInputValue(FacesContext context, UIComponent component) {
    UICalendar calendar = (UICalendar) 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.