Package org.ajax4jsf.javascript

Examples of org.ajax4jsf.javascript.JSReference


       
        targetId = HtmlUtil.expandIdSelector(targetId, this, FacesContext
                .getCurrentInstance());
       
        JSFunction invocation = new JSFunction("Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
        invocation.addParameter(targetId);
        invocation.addParameter(getOperation());
        invocation.addParameter(new JSReference("{" + getEncodedParametersMap() + "}"));
        invocation.addParameter(Boolean.valueOf(isDisableDefault()));
       
        return invocation.toScript();
    }
View Full Code Here


            }
           
            ScriptUtils.addEncodedString(result, name);
            result.append(": ");
            result.append(ScriptUtils.toScript(escape ? value
                    : new JSReference(value.toString())));
           
            shouldClose = true;
        }
       
        return result.toString();
View Full Code Here

          if(value == null) {
            value = "";
          }
          parameters.put(name, value);
        } else {
          parameters.put(name, new JSReference(value.toString()));
          // if(it.hasNext()){onEvent.append(',');};
          // renderAjaxLinkParameter( name,
          // value, onClick, jsForm, nestingForm);
        }
      }
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;
  }
View Full Code Here

    if (oncomplete != null) {
      oncompleteDefinition.addToBody(oncomplete);
    }

    options.put("oncomplete", oncompleteDefinition);
    JSReference requestValue = new JSReference("requestValue");
    ajaxFunction.addParameter(options);
    JSFunctionDefinition definition = new JSFunctionDefinition();
    definition.addParameter(requestValue);
    definition.addToBody(ajaxFunction);
    writer.write(definition.toScript());
View Full Code Here

      if (child instanceof UIParameter) {
        UIParameter parameter = ((UIParameter) child);
        String name = parameter.getName();
        func.addParameter(name);
        // Put parameter name to AJAX.Submit parameter, with default value.
        JSReference reference = new JSReference(name);
        if (null != parameter.getValue()) {
          reference = new JSReference(name + "||"
              + ScriptUtils.toScript(parameters.get(name)));

        }
        // Replace parameter value to reference.
        parameters.put(name, reference);
View Full Code Here

    StringBuffer script = new StringBuffer("\n");
    if (isAjaxMode(component) && progressBar.isEnabled()) {
      JSFunction function = AjaxRendererUtils.buildAjaxFunction(
          component, context, AJAX_POLL_FUNCTION);

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

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

          escape = !actionParam.isNoEscape();
        }
        if (escape) {
          parameters.put(name, value);
        } else {
          parameters.put(name, new JSReference(value.toString()));
          // if(it.hasNext()){onEvent.append(',');};
          // renderAjaxLinkParameter( name,
          // value, onClick, jsForm, nestingForm);
        }
      }
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;
  }
View Full Code Here

    if(event.startsWith("on")){
      event = event.substring(2);
    }
   
    Map eventsMap = new HashMap();
    eventsMap.put(new JSReference("event"), event);
    eventsMap.put(new JSReference("onshow"), toolTip.getOnshow());
    eventsMap.put(new JSReference("oncomplete"), toolTip.getOncomplete());
    eventsMap.put(new JSReference("onhide"), toolTip.getOnhide());
    eventsMap.put(new JSReference("delay"), new Integer(toolTip.getDelay()));
   
    JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
    JSReference ref = new JSReference("ajaxOptions");
    function.addParameter(ref);
    String ajaxFunc = function.toScript();
   
    Map ajaxOptions = buildEventOptions(context, toolTip);
   
View Full Code Here

TOP

Related Classes of org.ajax4jsf.javascript.JSReference

Copyright © 2018 www.massapicom. 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.