Package org.ajax4jsf.javascript

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


      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


        }
    if (!scriptObjects.isEmpty()) {
        buffer.append(".");
        JSFunction function = new JSFunction("addItems");
        function.addParameter(scriptObjects);
        function.appendScript(buffer);
    }
        buffer.append(";");
        context.getResponseWriter().write(buffer.toString());
    }
   
View Full Code Here

    utils.addToScriptHash(options, "hideDelay", component.getAttributes().get("hideDelay"), "300");
    utils.addToScriptHash(options, "selectedClass", component.getAttributes().get("selectedLabelClass"));
        if (!options.isEmpty()) {
          function.addParameter(options);
    }
    function.appendScript(buffer);
    if (component instanceof UIMenuGroup) {
      options = new HashMap<String, Object>();
      buffer.append(".");
      JSFunction subMenuFunction = new JSFunction("asSubMenu");
      subMenuFunction.addParameter(component.getParent().getClientId(context)+"_menu");
View Full Code Here

      utils.addToScriptHash(options, "onopen", component.getAttributes().get("onopen"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
      utils.addToScriptHash(options, "onclose", component.getAttributes().get("onclose"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
        if (!options.isEmpty()) {
          subMenuFunction.addParameter(options);
        }
      subMenuFunction.appendScript(buffer);
    } else {
      buffer.append(".");
      JSFunction menuFunction = getMenuScriptFunction(context, component);
      Map<String, Object> menuOptions = getMenuOptions(component);
      if (!menuOptions.isEmpty()) {
View Full Code Here

      JSFunction menuFunction = getMenuScriptFunction(context, component);
      Map<String, Object> menuOptions = getMenuOptions(component);
      if (!menuOptions.isEmpty()) {
        menuFunction.addParameter(menuOptions);
      }
      menuFunction.appendScript(buffer);
    }
    return buffer.toString();
    }
   
  protected Map<String, Object> getMenuOptions(UIComponent component) {
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

        if(null != pushUrl){
            options.put("pushUrl", pushUrl);
        }
        //        options.put("timeout", interval);
        function.addParameter(options);
        function.appendScript(script);
        } else {
          script.append("A4J.AJAX.StopPush('").append(push.getListenerId(context)).append("')");
        }
        script.append(";\n");
        writer.writeText(script.toString(),null);
View Full Code Here

   
    parameters.put(getHiddenFieldId(context, form, component), component.getClientId(context));
   
    submit.addParameter(parameters);
    onclick.append("return ");
    submit.appendScript(onclick);
    writer.writeAttribute(HTML.onclick_ATTRIBUTE,onclick,"onclick");
    //
    encodeValue(writer,context,component);
  }
View Full Code Here

          options.put("onsubmit", onsubmitFunction);
        }

//        options.put("timeout", interval);
        function.addParameter(options);
        function.appendScript(script);
        } else {
          script.append("A4J.AJAX.StopPoll('").append(component.getClientId(context)).append("')");
        }
        script.append(";\n");
        writer.writeText(script.toString(),null);
View Full Code Here

        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
            component, context,
            AJAX_FORM_FUNCTION_NAME);
        ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(
            context, component, false));
        ajaxFunction.appendScript(onSubmit);
        writer.writeURIAttribute("action", onSubmit, "action");
      } else {
        encodeSubmitAction(writer, context);
      }
    } else {
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.