Examples of toScript()


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

    while (iterator.hasNext()) {
      Entry<String, Object> entry = iterator.next();
      Object value = entry.getValue();
      if (value instanceof JSFunctionDefinition) {
        JSFunctionDefinition definition = (JSFunctionDefinition) value;
        entry.setValue(definition.toScript());
      }
    }
  }

  private ScriptOptions createOptions(FacesContext context, UITreeNode component, Class<?> clazz) {
View Full Code Here

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

      Object script = slider.getAttributes().get(eventName);
      if(script != null && !script.equals("")){
        JSFunctionDefinition jsFunctionDefinition  = new JSFunctionDefinition();
        jsFunctionDefinition.addParameter("event");
        jsFunctionDefinition.addToBody(script);
        returnScript = jsFunctionDefinition.toScript();
     
     
      return returnScript;
    }
View Full Code Here

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

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

    return function.toScript();
  }
 
  /**
   * https://jira.jboss.org/jira/browse/RF-8053 - public hook to change action URL in portlet environment.
   * @param context
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

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

      Object script = slider.getAttributes().get(eventName);
      if(script != null && !script.equals("")){
        JSFunctionDefinition jsFunctionDefinition  = new JSFunctionDefinition();
        jsFunctionDefinition.addParameter("event");
        jsFunctionDefinition.addToBody(script);
        returnScript = jsFunctionDefinition.toScript();
     
     
      return returnScript;
    }
View Full Code Here

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

    public void addAjaxSubmitFunction() {
        if (!this.hasSubmittingBehavior()) {
            hasSubmittingBehavior = true;

            ScriptString ajaxFunction = buildAjaxFunction(facesContext, component);
            this.addInlineHandlerAsValue(ajaxFunction.toScript());
        }
    }

    public String toScript() {
        String result = null;
View Full Code Here

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

     * @param builder
     */
    protected void ajax(int time, String data, ParametersBuilder builder) {
        JSFunction function = new JSFunction("simulationContext.ajax", time, data, builder.getParameters());

        page.executeJavaScript(function.toScript());
    }

    protected void executeOnTime(int time, String expression) {
        JSFunction function = new JSFunction("simulationContext.executeOnTime", time,
                new JSFunctionDefinition().addToBody(expression));
View Full Code Here

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

    protected void executeOnTime(int time, String expression) {
        JSFunction function = new JSFunction("simulationContext.executeOnTime", time,
                new JSFunctionDefinition().addToBody(expression));

        page.executeJavaScript(function.toScript());
    }

    private String buildClickExpression(String id) {
        return "document.getElementById('" + id + "').click()";
    }
View Full Code Here

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

    protected void clickOnTime(int time, String id) {
        JSFunction function = new JSFunction("simulationContext.executeOnTime", time,
                new JSFunctionDefinition().addToBody(buildClickExpression(id)));

        page.executeJavaScript(function.toScript());
    }

    protected String getRootContextPath() {
        return this.getClass().getPackage().getName().replace('.', '/');
    }
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.