Package org.ajax4jsf.javascript

Examples of org.ajax4jsf.javascript.JSLiteral


        .append(mode).append("',") // mode
        .append(minValue).append(",") // min value
        .append(maxValue).append(","); // max value
    script.append(getContext(component)); // context
    script.append(",");
    script.append(markup != null ? new JSLiteral(markup.toString())
        : JSReference.NULL); // markup
    script.append(",");
    script.append(ScriptUtils.toScript(buildAjaxOptions(clientId, // options
        progressBar, context)));
    String progressVar = (String) component.getAttributes().get(
View Full Code Here


   * @return
   */
  private JSLiteral getContext(UIComponent component) {
    StringBuffer buffer = new StringBuffer();
    String parameters = getParameters(component);
    JSLiteral literal = null;
    if (parameters != null) {
      buffer.append("{").append(parameters).append("}");
      literal = new JSLiteral(buffer.toString());
    } else {
      literal = new JSLiteral("null");
    }
    return literal;
  }
View Full Code Here

        context.setResponseWriter(writer);
      }
      result = customWriter.getContent();
    }

    return (result != null) ? new JSLiteral(result.toString())
        : null;
  }
View Full Code Here

        Map params = getParameters(context,component);
        if(!params.isEmpty()){
          parameters.putAll(params);
        }
       
        parameters.put(component.getClientId(context), new JSLiteral("event.memo.page"));
       
        function.addParameter(eventOptions);
        StringBuffer buffer = new StringBuffer();
        function.appendScript(buffer);
        buffer.append("; return false;");
View Full Code Here

    if (parameters != null) {
      buffer.append(",");
      buffer.append(parameters);
    }
    buffer.append("}");
    return new JSLiteral(buffer.toString());
  }
View Full Code Here

   * @param renderer
   * @return
   */
  private JSLiteral getMarkup(FacesContext context,
      AbstractProgressBarRenderer renderer) {
    JSLiteral literal = null;
    try {
      StringBuffer markup = renderer.getMarkup(context, this);
      if (markup != null) {
        literal = new JSLiteral(markup.toString());
      }
    } catch (Exception e) {

    }
    return literal;
View Full Code Here

      getUtils().addToScriptHash(options, "targetId", targetId,  null , ScriptHashVariableWrapper.DEFAULT);
      getUtils().addToScriptHash(options, "attachId", attachId,  null , ScriptHashVariableWrapper.DEFAULT);
      getUtils().addToScriptHash(options, "type", attributes.get("type")null , ScriptHashVariableWrapper.DEFAULT);
      getUtils().addToScriptHash(options, "event", attributes.get("event")null , ScriptHashVariableWrapper.DEFAULT);
      getUtils().addToScriptHash(options, "name", attributes.get("name")null , ScriptHashVariableWrapper.DEFAULT);
      getUtils().addToScriptHash(options, "params", new JSLiteral(convertParameters(context, (UIEffect)component))null , ScriptHashVariableWrapper.DEFAULT);
     
      JSFunction function = new JSFunction("Richfaces.effect.create");
      if (!options.isEmpty()) {
        function.addParameter(options);
      }
View Full Code Here

        context.setResponseWriter(writer);
      }
      result = customWriter.getContent();
    }

    return (result != null) ? new JSLiteral(result.toString())
        : null;
  }
View Full Code Here

        utils.addToScriptHash(options, "mode", component.getAttributes().get("mode"), "ajax");
        utils.addToScriptHash(options, "minValue", component.getAttributes().get("minValue"), "0");
        utils.addToScriptHash(options, "maxValue", component.getAttributes().get("maxValue"), "100");
        utils.addToScriptHash(options, "context", getContext(component));
    StringBuffer markup = getMarkup(context, component);
        utils.addToScriptHash(options, "markup", markup != null ? new JSLiteral(markup.toString()) : null);
        utils.addToScriptHash(options, "options", buildAjaxOptions(clientId, progressBar, context));
        utils.addToScriptHash(options, "progressVar", component.getAttributes().get("progressVar"));
        utils.addToScriptHash(options, "state", state, "initialState");
        utils.addToScriptHash(options, "value", variables.getVariable("value"));
View Full Code Here

   * @return
   */
  private JSLiteral getContext(UIComponent component) {
    StringBuffer buffer = new StringBuffer();
    String parameters = getParameters(component);
    JSLiteral literal = null;
    if (parameters != null) {
      buffer.append("{").append(parameters).append("}");
      literal = new JSLiteral(buffer.toString());
    }
    return literal;
  }
View Full Code Here

TOP

Related Classes of org.ajax4jsf.javascript.JSLiteral

Copyright © 2018 www.massapicom. 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.