Package org.ajax4jsf.javascript

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


        ScriptOptions dropOptions = contributor.buildOptions(context, column);
        JSONObject dndParams = new JSONObject();
        dropOptions.addOption("dndParams", dndParams.toString());

        function.addParameter(dropOptions);
        function.appendScript(buffer);

        String dropTargetScriptId = column.getClientId(context) + ":"
                + DROP_TARGET_SCRIPT_ID
                + (before ? DROP_TARGET_BEFORE : DROP_TARGET_AFTER);
        String scriptContribution = contributor.getScriptContribution(context,
View Full Code Here


        Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
            child, true);
        function.addParameter(eventOptions);
       
        buffer.append(",\"");
        function.appendScript(buffer);
        buffer.append("\"");
  }
 
  protected void addOnItemHover(String menuOnItemHover, UIComponent child, StringBuffer buffer) {
        buffer.append(",\"");
View Full Code Here

                    Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
                            tab, true);
                    function.addParameter(eventOptions);

                    StringBuffer buffer = new StringBuffer();
                    function.appendScript(buffer);
                    //TODO remove this.onclick = null
                    buffer.append("; return false; this.onclick = null;");
                    String script = buffer.toString();
                    writer.writeAttribute(HTML.onclick_ATTRIBUTE, activeCheck + eventCheck +  script, null);
                } else /* TODO if server */ {
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, true));
      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

    DnDParametersEncoder parametersEncoder = DnDParametersEncoder.getInstance();
    dropOptions.addOption("dndParams", parametersEncoder.doEncodeAsString(context, component));

    function.addParameter(dropOptions);
    function.appendScript(buffer);

    String scriptContribution = contributor.getScriptContribution(context, component);
    if (scriptContribution != null && scriptContribution.length() != 0) {
      buffer.append(scriptContribution);
    }
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, true));
             ajaxFunction.appendScript(onClick);
View Full Code Here

          function.appendScript(onClick);
          onClick.append(";");
       
          JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(tgComp, context);
          ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(context, tgComp, true));
             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

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.