Package org.ajax4jsf.javascript

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


    ResponseWriter writer = context.getResponseWriter();
    Object script = component.getAttributes().get(eventName);
    if (script != null && !script.equals("")) {
      JSFunctionDefinition onEventDefinition = new JSFunctionDefinition();
      onEventDefinition.addParameter("event");
      onEventDefinition.addToBody(script);
      writer.writeText(eventName + ": "
          + onEventDefinition.toScript(), null);
    }else{
      writer.writeText(eventName + ": ''", null);
View Full Code Here


    if (event != null) {
      event = event.trim();
   
      if (event.length() != 0) {
        JSFunctionDefinition function = new JSFunctionDefinition();
        function.addParameter("event");
        if(null!=append && append.length()>0){
          function.addToBody(event+append);
        }else{
          function.addToBody(event);
        }
View Full Code Here

    for (Iterator<UIComponent> it = component.getChildren().iterator(); it.hasNext();) {
      UIComponent child = it.next();
      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)));
View Full Code Here

   
   
    JSFunctionDefinition functionDefinition = new JSFunctionDefinition();
   
    JSReference sortEvent = new JSReference("event");
    functionDefinition.addParameter(sortEvent);
    functionDefinition.addToBody(onSortAjaxUpdate(context, grid));
   
    addOption("onSortAjaxUpdate", functionDefinition)
   
  }
View Full Code Here

        }
        String onselect = (String) attributes.get("onselect");
        if (null != onselect) {
            JSFunctionDefinition function = new JSFunctionDefinition(
                    "suggestion");
            function.addParameter("event");
            function.addToBody(onselect);

            options.put("onselect", function);

        }
View Full Code Here

     *
     * @see org.richfaces.renderkit.html.TableMenuRenderer#createShowMenuEventFunction()
     */
    public JSFunctionDefinition createShowMenuEventFunction() {
        JSFunctionDefinition definition = new JSFunctionDefinition();
        definition.addParameter("event");
        definition.addParameter("columnId");
        definition.addParameter("menuId");
        JSFunction invocation = new JSFunction(
                "Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
View Full Code Here

     * @see org.richfaces.renderkit.html.TableMenuRenderer#createShowMenuEventFunction()
     */
    public JSFunctionDefinition createShowMenuEventFunction() {
        JSFunctionDefinition definition = new JSFunctionDefinition();
        definition.addParameter("event");
        definition.addParameter("columnId");
        definition.addParameter("menuId");
        JSFunction invocation = new JSFunction(
                "Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
        invocation.addParameter(new JSReference("menuId"));
View Full Code Here

     */
    public JSFunctionDefinition createShowMenuEventFunction() {
        JSFunctionDefinition definition = new JSFunctionDefinition();
        definition.addParameter("event");
        definition.addParameter("columnId");
        definition.addParameter("menuId");
        JSFunction invocation = new JSFunction(
                "Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
        invocation.addParameter(new JSReference("menuId"));
        invocation.addParameter("show");
View Full Code Here

    StringBuffer result = new StringBuffer();

    result.append(".drop = ");

    JSFunctionDefinition definition = new JSFunctionDefinition();
    definition.addParameter("event");
    definition.addParameter("drag");

    Map<String, Object> requestOpts = AjaxRendererUtils.buildEventOptions(context, column);
    //replace parameters
    String clientId = column.getClientId(context);
View Full Code Here

    result.append(".drop = ");

    JSFunctionDefinition definition = new JSFunctionDefinition();
    definition.addParameter("event");
    definition.addParameter("drag");

    Map<String, Object> requestOpts = AjaxRendererUtils.buildEventOptions(context, column);
    //replace parameters
    String clientId = column.getClientId(context);
    @SuppressWarnings("unchecked")
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.