Package org.ajax4jsf.javascript

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


        options.put("expandMode", expandMode);
        options.put("isNested", isNested);
        options.put("eventOptions", AjaxRendererUtils.buildEventOptions(facesContext, subTable));

        JSFunction jsFunction = new JSFunction("new RichFaces.ui.CollapsibleSubTable");
        jsFunction.addParameter(id);
        jsFunction.addParameter(formId);
        jsFunction.addParameter(options);

        writer.startElement(HtmlConstants.SCRIPT_ELEM, subTable);
        writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.JAVASCRIPT_TYPE, null);
View Full Code Here


        options.put("isNested", isNested);
        options.put("eventOptions", AjaxRendererUtils.buildEventOptions(facesContext, subTable));

        JSFunction jsFunction = new JSFunction("new RichFaces.ui.CollapsibleSubTable");
        jsFunction.addParameter(id);
        jsFunction.addParameter(formId);
        jsFunction.addParameter(options);

        writer.startElement(HtmlConstants.SCRIPT_ELEM, subTable);
        writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.JAVASCRIPT_TYPE, null);
        writer.writeText(jsFunction.toScript(), null);
View Full Code Here

        options.put("eventOptions", AjaxRendererUtils.buildEventOptions(facesContext, subTable));

        JSFunction jsFunction = new JSFunction("new RichFaces.ui.CollapsibleSubTable");
        jsFunction.addParameter(id);
        jsFunction.addParameter(formId);
        jsFunction.addParameter(options);

        writer.startElement(HtmlConstants.SCRIPT_ELEM, subTable);
        writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.JAVASCRIPT_TYPE, null);
        writer.writeText(jsFunction.toScript(), null);
        writer.endElement(HtmlConstants.SCRIPT_ELEM);
View Full Code Here

                result = handlers.get(0);
            } else {
                JSFunction jsFunction = new JSFunction("jsf.util.chain", JSReference.THIS, JSReference.EVENT);

                for (String handler : handlers) {
                    jsFunction.addParameter(handler);
                }

                result = jsFunction.toScript();
            }
        }
View Full Code Here

    // status - id of request status component.
    // parameters - map of parameters name/value for append on request.
    // TODO
    // 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;
View Full Code Here

  public static JSFunction buildAjaxFunction(UIComponent uiComponent,
      FacesContext facesContext) {
    JSFunction ajaxFunction = buildAjaxFunction(uiComponent, facesContext,
        AJAX_FUNCTION_NAME);
    // client-side script must have reference to event-enabled object.
    ajaxFunction.addParameter(new JSReference("event"));
    return ajaxFunction;
  }

  /**
   * Create call to Ajax Submit function with first two parameters
View Full Code Here

        facesContext, uiComponent);
   
   
    String clientId = nestingContainer.getClientId(facesContext);
    if (clientId != null) {
        ajaxFunction.addParameter(clientId);
    } else {
        // fix for myfaces 1.2.4
        ajaxFunction.addParameter(JSReference.NULL);  
    }
       
View Full Code Here

    String clientId = nestingContainer.getClientId(facesContext);
    if (clientId != null) {
        ajaxFunction.addParameter(clientId);
    } else {
        // fix for myfaces 1.2.4
        ajaxFunction.addParameter(JSReference.NULL);  
    }
       
    // build form name or ActionUrl for script
    UIComponent nestingForm = getNestingForm(uiComponent);
    if (null == nestingForm) {
View Full Code Here

    }
       
    // build form name or ActionUrl for script
    UIComponent nestingForm = getNestingForm(uiComponent);
    if (null == nestingForm) {
      ajaxFunction.addParameter(JSReference.NULL);
    } else {
      ajaxFunction.addParameter(nestingForm.getClientId(facesContext));
    }
    return ajaxFunction;
  }
View Full Code Here

    // build form name or ActionUrl for script
    UIComponent nestingForm = getNestingForm(uiComponent);
    if (null == nestingForm) {
      ajaxFunction.addParameter(JSReference.NULL);
    } else {
      ajaxFunction.addParameter(nestingForm.getClientId(facesContext));
    }
    return ajaxFunction;
  }

  /**
 
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.