Package org.ajax4jsf.javascript

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


        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

  if (UISimpleTogglePanel.CLIENT_SWITCH_TYPE.equals(switchType)) {
            // Client
            JSFunction function = new JSFunction("SimpleTogglePanelManager.toggleOnClient");
            function.addParameter(eventRef);
            function.addParameter(panelId);
            function.appendScript(onClick);
            onClick.append(";");
           
        } else if (UISimpleTogglePanel.AJAX_SWITCH_TYPE.equals(switchType)) {
//      Ajax
                  
View Full Code Here

//      Ajax
                  
          JSFunction function = new JSFunction("SimpleTogglePanelManager.toggleOnAjax");
          function.addParameter(eventRef);
          function.addParameter(panelId);
          function.appendScript(onClick);
          onClick.append(";");
       
          JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(tgComp, context);
          ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(context, tgComp));
             ajaxFunction.appendScript(onClick);
View Full Code Here

          function.appendScript(onClick);
          onClick.append(";");
       
          JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(tgComp, context);
          ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(context, tgComp));
             ajaxFunction.appendScript(onClick);
            
             if (tgComp instanceof AjaxSupport) {
          AjaxSupport support = (AjaxSupport) tgComp;
          if (support.isDisableDefault()) {
            onClick.append("; return false;");
View Full Code Here

        } else {
            // Server
          JSFunction function = new JSFunction("SimpleTogglePanelManager.toggleOnServer")
            function.addParameter(eventRef);
            function.addParameter(panelId);
            function.appendScript(onClick);
            onClick.append(";");       
            //.append(tgComp.getSwitch()==null?"'0'":"'" + tgComp.getSwitch() + "'")
            //.append("")
        }
        return onClick.toString();
View Full Code Here

       
      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

      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" +
                                                "$('"+ clientId +"slider_val').value = value;\n" +
                                                script.toString() +
                                                "}\n";
View Full Code Here

    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();
  }

  protected String getScriptContributions(FacesContext context, UITree tree) {
View Full Code Here

        if (onAjaxCompleteFunction != null)
            eventOptions.put(AjaxRendererUtils.ONCOMPLETE_ATTR_NAME,
                    onAjaxCompleteFunction);
        ajaxFunction.addParameter(eventOptions);
        StringBuffer buffer = new StringBuffer();
        ajaxFunction.appendScript(buffer);

        return buffer.toString();
    }

    protected class SimpleHeaderEncodeStrategy implements HeaderEncodeStrategy {
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.