Package org.ajax4jsf.renderkit

Examples of org.ajax4jsf.renderkit.RendererUtils.addToScriptHash()


             
              Map<String, Object> paramsMap = getParamsAsMap(context, menuItem);
              rendererUtils.addToScriptHash(scriptOptionsMap, "p", paramsMap, null, ScriptHashVariableWrapper.DEFAULT);

              String target = (String) menuItemAttributes.get("target");
              rendererUtils.addToScriptHash(scriptOptionsMap, "t", target, null, ScriptHashVariableWrapper.DEFAULT);

              if (!scriptOptionsMap.isEmpty()) {
                scriptValue.append(',');
                scriptValue.append(ScriptUtils.toScript(scriptOptionsMap));
              }
View Full Code Here


        String eventShow = (toolTip.isAttached()) ? toolTip.getShowEvent() : "";
        if (eventShow.startsWith("on")) {
            eventShow = eventShow.substring(2);
        }
        RendererUtils utils = getUtils();
    utils.addToScriptHash(options, "showEvent", eventShow);
        String eventHide = (toolTip.isAttached()) ? toolTip.getHideEvent() : "";
        if (eventHide.startsWith("on")) {
            eventHide = eventHide.substring(2);
        }
        utils.addToScriptHash(options, "hideEvent", eventHide);
View Full Code Here

    utils.addToScriptHash(options, "showEvent", eventShow);
        String eventHide = (toolTip.isAttached()) ? toolTip.getHideEvent() : "";
        if (eventHide.startsWith("on")) {
            eventHide = eventHide.substring(2);
        }
        utils.addToScriptHash(options, "hideEvent", eventHide);

        utils.addToScriptHash(options, "delay", toolTip.getShowDelay(), "0");
        utils.addToScriptHash(options, "hideDelay", toolTip.getHideDelay(), "0");
       
        if (AJAX_MODE.equalsIgnoreCase(toolTip.getMode())) {
View Full Code Here

        if (eventHide.startsWith("on")) {
            eventHide = eventHide.substring(2);
        }
        utils.addToScriptHash(options, "hideEvent", eventHide);

        utils.addToScriptHash(options, "delay", toolTip.getShowDelay(), "0");
        utils.addToScriptHash(options, "hideDelay", toolTip.getHideDelay(), "0");
       
        if (AJAX_MODE.equalsIgnoreCase(toolTip.getMode())) {
          JSFunctionDefinition ajaxFunc = new JSFunctionDefinition("event");
            JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
View Full Code Here

            eventHide = eventHide.substring(2);
        }
        utils.addToScriptHash(options, "hideEvent", eventHide);

        utils.addToScriptHash(options, "delay", toolTip.getShowDelay(), "0");
        utils.addToScriptHash(options, "hideDelay", toolTip.getHideDelay(), "0");
       
        if (AJAX_MODE.equalsIgnoreCase(toolTip.getMode())) {
          JSFunctionDefinition ajaxFunc = new JSFunctionDefinition("event");
            JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
            Map<String, Object> ajaxOptions = buildEventOptions(context, toolTip);
View Full Code Here

            JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
            Map<String, Object> ajaxOptions = buildEventOptions(context, toolTip);
            ajaxOptions.putAll(getParamsMap(context, toolTip));
            function.addParameter(ajaxOptions);
            ajaxFunc.addToBody(function);
            utils.addToScriptHash(options, "ajaxFunction", ajaxFunc);
       }
       
        JSFunctionDefinition hideFunc = utils.getAsEventHandler(
                context, component, "onhide", "; return true;");
        utils.addToScriptHash(options, "onhide", hideFunc);
View Full Code Here

            utils.addToScriptHash(options, "ajaxFunction", ajaxFunc);
       }
       
        JSFunctionDefinition hideFunc = utils.getAsEventHandler(
                context, component, "onhide", "; return true;");
        utils.addToScriptHash(options, "onhide", hideFunc);

        JSFunctionDefinition showFunc = utils.getAsEventHandler(
                context, component, "onshow", "; return true;");
        utils.addToScriptHash(options, "onshow", showFunc);
       
View Full Code Here

                context, component, "onhide", "; return true;");
        utils.addToScriptHash(options, "onhide", hideFunc);

        JSFunctionDefinition showFunc = utils.getAsEventHandler(
                context, component, "onshow", "; return true;");
        utils.addToScriptHash(options, "onshow", showFunc);
       
        utils.addToScriptHash(options, "disabled", toolTip.isDisabled(), "false");
        String direction = toolTip.getDirection();
        if (DIRECTION_AUTO.equalsIgnoreCase(direction)) {
            direction = DIRECTION_BOTTOM_RIGHT;
View Full Code Here

        JSFunctionDefinition showFunc = utils.getAsEventHandler(
                context, component, "onshow", "; return true;");
        utils.addToScriptHash(options, "onshow", showFunc);
       
        utils.addToScriptHash(options, "disabled", toolTip.isDisabled(), "false");
        String direction = toolTip.getDirection();
        if (DIRECTION_AUTO.equalsIgnoreCase(direction)) {
            direction = DIRECTION_BOTTOM_RIGHT;
        }
        utils.addToScriptHash(options, "direction", direction, DIRECTION_BOTTOM_RIGHT);
View Full Code Here

        utils.addToScriptHash(options, "disabled", toolTip.isDisabled(), "false");
        String direction = toolTip.getDirection();
        if (DIRECTION_AUTO.equalsIgnoreCase(direction)) {
            direction = DIRECTION_BOTTOM_RIGHT;
        }
        utils.addToScriptHash(options, "direction", direction, DIRECTION_BOTTOM_RIGHT);
        utils.addToScriptHash(options, "followMouse", toolTip.isFollowMouse(), "false");
        utils.addToScriptHash(options, "horizontalOffset", toolTip.getHorizontalOffset(), "10");
        utils.addToScriptHash(options, "verticalOffset", toolTip.getVerticalOffset(), "10");

        StringBuffer ret = new StringBuffer();
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.