Package org.ajax4jsf.javascript

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


        this.messages = Lists.newArrayList(messages);
    }

    public void appendScript(Appendable target) throws IOException {
        JSFunction resetMessages = new JSFunction("RichFaces.csv.clearMessage", clientId);
        resetMessages.appendScript(target);
        target.append(';');
        for (Message message : messages) {
            JSFunction sendMessage = new JSFunction("RichFaces.csv.sendMessage", clientId, message);
            sendMessage.appendScript(target);
            target.append(';');
View Full Code Here


        JSFunction resetMessages = new JSFunction("RichFaces.csv.clearMessage", clientId);
        resetMessages.appendScript(target);
        target.append(';');
        for (Message message : messages) {
            JSFunction sendMessage = new JSFunction("RichFaces.csv.sendMessage", clientId, message);
            sendMessage.appendScript(target);
            target.append(';');
        }
    }
}
View Full Code Here

        Map<String, Object> eventOptions =
            AjaxRendererUtils.buildEventOptions(context, child);
        function.addParameter(eventOptions);
       
        buffer.append(",\"");
        function.appendScript(buffer);
        buffer.append("\"");
  }
 
  protected void addOnItemHover(String menuOnItemHover, UIComponent child,
            StringBuffer buffer) {
View Full Code Here

    // parameters - map of parameters name/value for append on request.
    // ..........
    ajaxFunction.addParameter(buildEventOptions(facesContext, uiComponent));

    // appendAjaxSubmitParameters(facesContext, uiComponent, onEvent);
    ajaxFunction.appendScript(onEvent);
    if (uiComponent instanceof AjaxSupport) {
      AjaxSupport support = (AjaxSupport) uiComponent;
      if (support.isDisableDefault()) {
        onEvent.append("; return false;");
      }
View Full Code Here

        if (onAjaxCompleteFunction != null)
            eventOptions.put(AjaxRendererUtils.ONCOMPLETE_ATTR_NAME,
                    onAjaxCompleteFunction);
        ajaxFunction.addParameter(eventOptions);
        StringBuffer buffer = new StringBuffer();
        ajaxFunction.appendScript(buffer);

        return buffer.toString();
    }

    protected class SimpleHeaderEncodeStrategy implements HeaderEncodeStrategy {
View Full Code Here

      JSFunction function = AjaxRendererUtils.buildAjaxFunction(
          component, context, AJAX_POLL_FUNCTION);

      function.addParameter(new JSReference("$('" + clientId
          + "').component.options"));
      function.appendScript(script);

      pollScript.append(script);
    } else {
      pollScript.append(getStopPollScript(clientId));
    }
View Full Code Here

      parameters.put(SORT_FILTER_PARAMETER, column.getClientId(context));
    }
    ajaxFunction.addParameter(eventOptions);
   
    StringBuffer buffer = new StringBuffer();
    ajaxFunction.appendScript(buffer);
   
    return buffer.toString();
  }
 
  protected void setRequiresScripts(FacesContext context) {
View Full Code Here

      function.addParameter(eventOptions);

      StringBuffer buffer = new StringBuffer();
      buffer.append(script);
      buffer.append(";");
      function.appendScript(buffer);
      buffer.append(";");
      return buffer.toString();
     
    } else if (UITree.SWITCH_SERVER.equals(tree.getSwitchType())) {
      String paramName = id + NODE_EXPANDED_INPUT_SUFFIX;
View Full Code Here

    // sync true/false - run script in sync mode.
    // ..........
    ajaxFunction.addParameter(buildEventOptions(facesContext, uiComponent));

    // appendAjaxSubmitParameters(facesContext, uiComponent, onEvent);
    ajaxFunction.appendScript(onEvent);
    if (uiComponent instanceof AjaxSupport) {
      AjaxSupport support = (AjaxSupport) uiComponent;
      if (support.isDisableDefault()) {
        onEvent.append("; return false;");
      }
View Full Code Here

        function.addParameter(component.getAttributes().get("hideDelay"));
        }
        else{
          function.addParameter(""+300);
        }
        function.appendScript(buffer);
    if (component instanceof UIMenuGroup) {
        buffer.append(".");
        function = new JSFunction("asSubMenu");
        function.addParameter(component.getParent().getClientId(context)+"_menu");
        function.addParameter("ref"+component.getClientId(context));
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.