Package org.ajax4jsf.javascript

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


        JSReference reference = new JSReference(options.toString());
       
      JSFunction function = new JSFunction("Richfaces.DFSControl.Slider");
      function.addParameter(clientId + "slider-handle");
      function.addParameter(clientId + "slider-track");
      function.addParameter(reference);
      function.appendScript(script);
      script.append(";");
     
      return script.toString();
   
View Full Code Here


        String sliderClientId = slider.getClientId(context);

        String id = slider.getId();

      JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(slider,context);
      ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(
        context, slider));
      StringBuffer script= new StringBuffer();
        ajaxFunction.appendScript(script);
        script.append("; return false");
        String sliderHandlerScript = "function updateSlider1(event, value) {\n" +
View Full Code Here

        flagGroup = Integer.valueOf(1);
      }
    }
    if (itemId != null) {
      JSFunction function = new JSFunction(".addItem");
      function.addParameter(itemId);
      ScriptOptions options = new ScriptOptions(kid);

      options.addEventHandler("onmouseout");
      options.addEventHandler("onmouseover");
     
View Full Code Here

        options.addOption("disabled", Boolean.TRUE);
      }
     
      options.addEventHandler("onselect");
     
      function.addParameter(options);
      return function.toScript();
    }
    return "";
  }
 
View Full Code Here

    Map eventOptions = AjaxRendererUtils.buildEventOptions(context, tree);
    Map parameters = (Map) eventOptions.get("parameters");
    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();
  }
View Full Code Here

      options.addOption("ajax", ajaxContext.isAjaxRequest());
     
         
      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);
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);
View Full Code Here

   * @see org.richfaces.renderkit.html.AbstractMenuRenderer#getLayerScript(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
   */
  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 UIContextMenu) {
        function.addParameter(component.getAttributes().get("hideDelay"));
        } else {
View Full Code Here

   */
  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 UIContextMenu) {
        function.addParameter(component.getAttributes().get("hideDelay"));
        } else {
          function.addParameter(new Integer(300));
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 UIContextMenu) {
        function.addParameter(component.getAttributes().get("hideDelay"));
        } else {
          function.addParameter(new Integer(300));
        }
       
    function.appendScript(buffer);
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.