Package org.ajax4jsf.javascript

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


    parameters.remove(id);
    parameters.put(id + UITree.SELECTED_NODE_PARAMETER_NAME,
        new JSReference("event.selectedNode"));
    function.addParameter(eventOptions);
    StringBuffer buffer = new StringBuffer();
    function.appendScript(buffer);
    buffer.append("; return false;");
    return buffer.toString();
  }

  public String writeScriptElement(FacesContext context, UITree tree, String code) throws IOException {
View Full Code Here


         
      StringBuffer script = new StringBuffer();
      JSFunction function = new JSFunction("new Richfaces.PanelBar");
      function.addParameter(panelBar.getClientId(context));
      function.addParameter(options);
      function.appendScript(script);
     
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement(HTML.SCRIPT_ELEM, panelBar);
      writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
      String outerScript = script.append(";").toString();
View Full Code Here

        function.addParameter(component.getAttributes().get("hideDelay"));
        } else {
          function.addParameter(new Integer(300));
        }
       
    function.appendScript(buffer);
   
    if (component instanceof UIMenuGroup) {
        buffer.append(".");
        function = new JSFunction("asSubMenu");
        function.addParameter(component.getParent().getClientId(context)+"_menu");
View Full Code Here

        subMenuOptions.addEventHandler("onopen");
        subMenuOptions.addEventHandler("onclose");
        subMenuOptions.addOption("direction");
        subMenuOptions.addOption("dummy", "dummy");
        function.addParameter(subMenuOptions);
        function.appendScript(buffer);

    } else {
        buffer.append(".");
        function = new JSFunction("asContextMenu");
/*        function.addParameter(component.getParent().getClientId(context));
View Full Code Here

        menuOptions.addEventHandler("onitemselect");
        menuOptions.addEventHandler("ongroupactivate");
       
        menuOptions.addOption("dummy", "dummy");
        function.addParameter(menuOptions);
        function.appendScript(buffer);

    }
   
    return buffer.toString();
  }
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

        }
        } else {
          function.addParameter(new Integer(300));
        }
       
    function.appendScript(buffer);
   
    if (component instanceof UIMenuGroup) {
        buffer.append(".");
        function = new JSFunction("asSubMenu");
        function.addParameter(component.getParent().getClientId(context)+"_menu");
View Full Code Here

        subMenuOptions.addEventHandler("onopen");
        subMenuOptions.addEventHandler("onclose");
        subMenuOptions.addOption("direction");
        subMenuOptions.addOption("highlightParent", Boolean.TRUE);
        function.addParameter(subMenuOptions);
        function.appendScript(buffer);

    } else {
        buffer.append(".");
        function = new JSFunction("asDropDown");
        function.addParameter(component.getClientId(context));
View Full Code Here

        menuOptions.addEventHandler("onexpand");
        menuOptions.addEventHandler("onitemselect");
        menuOptions.addEventHandler("ongroupactivate");
        menuOptions.addOption("disabled");
        function.addParameter(menuOptions);
        function.appendScript(buffer);

    }
   
    return buffer.toString();
  }
View Full Code Here

        function.addParameter(component.getAttributes().get("hideDelay"));
        } else {
          function.addParameter(new Integer(300));
        }
       
    function.appendScript(buffer);
   
    if (component instanceof UIMenuGroup) {
        buffer.append(".");
        function = new JSFunction("asSubMenu");
        function.addParameter(component.getParent().getClientId(context)+"_menu");
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.