Package org.ajax4jsf.javascript

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


        String pushUrl = context.getExternalContext().getInitParameter(PUSH_URL_PARAMETER);
        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");
View Full Code Here


    Map<String, Object> parameters = (Map<String, Object>) options.get("parameters");
    if (null == parameters) {
      parameters = new HashMap<String, Object>();
      options.put("parameters", parameters);
    }
    ajaxFunction.addParameter(JSReference.NULL);
    ajaxFunction.addParameter(options);
    // Fill parameters.
    for (Iterator<UIComponent> it = component.getChildren().iterator(); it.hasNext();) {
      UIComponent child = it.next();
      if (child instanceof UIParameter) {
View Full Code Here

    if (null == parameters) {
      parameters = new HashMap<String, Object>();
      options.put("parameters", parameters);
    }
    ajaxFunction.addParameter(JSReference.NULL);
    ajaxFunction.addParameter(options);
    // Fill parameters.
    for (Iterator<UIComponent> it = component.getChildren().iterator(); it.hasNext();) {
      UIComponent child = it.next();
      if (child instanceof UIParameter) {
        UIParameter parameter = ((UIParameter) child);
View Full Code Here

          onsubmitFunction.addToBody(onsubmit);
          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");
View Full Code Here

      if (form.isAjaxSubmit()) {
        StringBuffer onSubmit = new StringBuffer("javascript:");
        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
            component, context,
            AJAX_FORM_FUNCTION_NAME);
        ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(
            context, component));
        ajaxFunction.appendScript(onSubmit);
        writer.writeURIAttribute("action", onSubmit, "action");
      } else {
        encodeSubmitAction(writer, context);
View Full Code Here

  @Override
  protected String getLayerScript(FacesContext context, UIComponent component) {
    StringBuffer buffer = new StringBuffer();
    JSFunction function = new JSFunction("new RichFaces.Menu.Layer");
    function.addParameter(component.getClientId(context)+"_menu");
    function.addParameter(component.getAttributes().get("showDelay"));
       
    if (component instanceof UIDropDownMenu) {
        function.addParameter(component.getAttributes().get("hideDelay"));
        Object selectedClass = component.getAttributes().get("selectedLabelClass");
View Full Code Here

  @Override
  protected String getLayerScript(FacesContext context, UIComponent component) {
    StringBuffer buffer = new StringBuffer();
    JSFunction function = new JSFunction("new RichFaces.Menu.Layer");
    function.addParameter(component.getClientId(context)+"_menu");
    function.addParameter(component.getAttributes().get("showDelay"));
       
    if (component instanceof UIDropDownMenu) {
        function.addParameter(component.getAttributes().get("hideDelay"));
        Object selectedClass = component.getAttributes().get("selectedLabelClass");
        if (null != selectedClass && !"".equals(selectedClass)) {
View Full Code Here

    JSFunction function = new JSFunction("new RichFaces.Menu.Layer");
    function.addParameter(component.getClientId(context)+"_menu");
    function.addParameter(component.getAttributes().get("showDelay"));
       
    if (component instanceof UIDropDownMenu) {
        function.addParameter(component.getAttributes().get("hideDelay"));
        Object selectedClass = component.getAttributes().get("selectedLabelClass");
        if (null != selectedClass && !"".equals(selectedClass)) {
          function.addParameter(selectedClass);
        }
        } else {
View Full Code Here

       
    if (component instanceof UIDropDownMenu) {
        function.addParameter(component.getAttributes().get("hideDelay"));
        Object selectedClass = component.getAttributes().get("selectedLabelClass");
        if (null != selectedClass && !"".equals(selectedClass)) {
          function.addParameter(selectedClass);
        }
        } else {
          function.addParameter(new Integer(300));
        }
       
View Full Code Here

        Object selectedClass = component.getAttributes().get("selectedLabelClass");
        if (null != selectedClass && !"".equals(selectedClass)) {
          function.addParameter(selectedClass);
        }
        } else {
          function.addParameter(new Integer(300));
        }
       
    function.appendScript(buffer);
   
    if (component instanceof UIMenuGroup) {
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.