Examples of JSLiteral


Examples of org.ajax4jsf.javascript.JSLiteral

        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

Examples of org.ajax4jsf.javascript.JSLiteral

   * @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

Examples of org.ajax4jsf.javascript.JSLiteral

        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

Examples of org.ajax4jsf.javascript.JSLiteral

    protected void addOnCompleteParam(FacesContext context, String itemName, String panelId) {
        String script = new StringBuilder().append("RichFaces.$('").append(panelId).append("').onCompleteHandler('")
                .append(itemName).append("');").toString();

        JavaScriptService scriptService = ServiceTracker.getService(JavaScriptService.class);
        scriptService.addScript(context, new JSLiteral(script.toString()));
    }
View Full Code Here

Examples of org.ajax4jsf.javascript.JSLiteral

            new JSReference("data"));

        AjaxFunction function = AjaxRendererUtils.buildAjaxFunction(facesContext, component);

        Map<String, Object> parameters = function.getOptions().getParameters();
        parameters.put(component.getClientId(facesContext) + ":page", new JSLiteral("data.page"));

        definition.addToBody(function.toScript());
        return definition;
    }
View Full Code Here

Examples of org.ajax4jsf.javascript.JSLiteral

    /**
     * This method ensures that component which should be focused will be present in the page in the time of running script (oncomplete).
     */
    public void renderOncompleteScript(FacesContext context, String script) {
        JavaScriptService javaScriptService = ServiceTracker.getService(JavaScriptService.class);
        javaScriptService.addScript(context, new JSLiteral(script));
    }
View Full Code Here

Examples of org.ajax4jsf.javascript.JSLiteral

                String clientId = component.getClientId(context);

                setContextAttribute(context, clientId);

                JavaScriptService javaScriptService = ServiceTracker.getService(context, JavaScriptService.class);
                javaScriptService.addPageReadyScript(context, new JSLiteral(String.format(SCRIPT, clientId)));
            }
        }
    }
View Full Code Here

Examples of org.ajax4jsf.javascript.JSLiteral

      }

    } catch (Exception e) {
      e.getMessage();
    }
    return (result != null) ? new JSLiteral(result.toString())
        : JSReference.NULL;
  }
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.