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


    StringBuffer buffer = new StringBuffer();
        Map<String, Object> options = new HashMap<String, Object>();
        RendererUtils utils = getUtils();
    JSFunction function = new JSFunction("new RichFaces.Menu.Layer");
    function.addParameter(component.getClientId(context)+"_menu");
    utils.addToScriptHash(options, "delay", component.getAttributes().get("showDelay"), "300");
    utils.addToScriptHash(options, "hideDelay", component.getAttributes().get("hideDelay"), "300");
    utils.addToScriptHash(options, "selectedClass", component.getAttributes().get("selectedLabelClass"));
        if (!options.isEmpty()) {
          function.addParameter(options);
    }
View Full Code Here

        Map<String, Object> options = new HashMap<String, Object>();
        RendererUtils utils = getUtils();
    JSFunction function = new JSFunction("new RichFaces.Menu.Layer");
    function.addParameter(component.getClientId(context)+"_menu");
    utils.addToScriptHash(options, "delay", component.getAttributes().get("showDelay"), "300");
    utils.addToScriptHash(options, "hideDelay", component.getAttributes().get("hideDelay"), "300");
    utils.addToScriptHash(options, "selectedClass", component.getAttributes().get("selectedLabelClass"));
        if (!options.isEmpty()) {
          function.addParameter(options);
    }
    function.appendScript(buffer);
View Full Code Here

        RendererUtils utils = getUtils();
    JSFunction function = new JSFunction("new RichFaces.Menu.Layer");
    function.addParameter(component.getClientId(context)+"_menu");
    utils.addToScriptHash(options, "delay", component.getAttributes().get("showDelay"), "300");
    utils.addToScriptHash(options, "hideDelay", component.getAttributes().get("hideDelay"), "300");
    utils.addToScriptHash(options, "selectedClass", component.getAttributes().get("selectedLabelClass"));
        if (!options.isEmpty()) {
          function.addParameter(options);
    }
    function.appendScript(buffer);
    if (component instanceof UIMenuGroup) {
View Full Code Here

      options = new HashMap<String, Object>();
      buffer.append(".");
      JSFunction subMenuFunction = new JSFunction("asSubMenu");
      subMenuFunction.addParameter(component.getParent().getClientId(context)+"_menu");
      subMenuFunction.addParameter(component.getClientId(context));
      utils.addToScriptHash(options, "evtName", component.getAttributes().get("event"), "onmouseover");
      utils.addToScriptHash(options, "direction", component.getAttributes().get("direction"), "auto");
      utils.addToScriptHash(options, "onopen", component.getAttributes().get("onopen"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
      utils.addToScriptHash(options, "onclose", component.getAttributes().get("onclose"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
        if (!options.isEmpty()) {
          subMenuFunction.addParameter(options);
View Full Code Here

  }

  protected Map<String, Object> getSymbolsMap(FacesContext facesContext, UICalendar calendar) {
    Map<String, Object> map = new LinkedHashMap<String, Object>();
    RendererUtils utils = getUtils();
    utils.addToScriptHash(map, WEEK_DAY_LABELS, ComponentUtil.asArray(calendar.getWeekDayLabels()));
    utils.addToScriptHash(map, WEEK_DAY_LABELS_SHORT, ComponentUtil.asArray(calendar.getWeekDayLabelsShort()));
    utils.addToScriptHash(map, MONTH_LABELS, ComponentUtil.asArray(calendar.getMonthLabels()));
    utils.addToScriptHash(map, MONTH_LABELS_SHORT, ComponentUtil.asArray(calendar.getMonthLabelsShort()));
    int day = calendar.getFirstWeekDay();
    if (0 <= day && day <= 6) {
View Full Code Here

  protected Map<String, Object> getSymbolsMap(FacesContext facesContext, UICalendar calendar) {
    Map<String, Object> map = new LinkedHashMap<String, Object>();
    RendererUtils utils = getUtils();
    utils.addToScriptHash(map, WEEK_DAY_LABELS, ComponentUtil.asArray(calendar.getWeekDayLabels()));
    utils.addToScriptHash(map, WEEK_DAY_LABELS_SHORT, ComponentUtil.asArray(calendar.getWeekDayLabelsShort()));
    utils.addToScriptHash(map, MONTH_LABELS, ComponentUtil.asArray(calendar.getMonthLabels()));
    utils.addToScriptHash(map, MONTH_LABELS_SHORT, ComponentUtil.asArray(calendar.getMonthLabelsShort()));
    int day = calendar.getFirstWeekDay();
    if (0 <= day && day <= 6) {
      utils.addToScriptHash(map, "firstWeekDay", day);     
View Full Code Here

  protected Map<String, Object> getSymbolsMap(FacesContext facesContext, UICalendar calendar) {
    Map<String, Object> map = new LinkedHashMap<String, Object>();
    RendererUtils utils = getUtils();
    utils.addToScriptHash(map, WEEK_DAY_LABELS, ComponentUtil.asArray(calendar.getWeekDayLabels()));
    utils.addToScriptHash(map, WEEK_DAY_LABELS_SHORT, ComponentUtil.asArray(calendar.getWeekDayLabelsShort()));
    utils.addToScriptHash(map, MONTH_LABELS, ComponentUtil.asArray(calendar.getMonthLabels()));
    utils.addToScriptHash(map, MONTH_LABELS_SHORT, ComponentUtil.asArray(calendar.getMonthLabelsShort()));
    int day = calendar.getFirstWeekDay();
    if (0 <= day && day <= 6) {
      utils.addToScriptHash(map, "firstWeekDay", day);     
    } else if (day != Integer.MIN_VALUE) {
View Full Code Here

    Map<String, Object> map = new LinkedHashMap<String, Object>();
    RendererUtils utils = getUtils();
    utils.addToScriptHash(map, WEEK_DAY_LABELS, ComponentUtil.asArray(calendar.getWeekDayLabels()));
    utils.addToScriptHash(map, WEEK_DAY_LABELS_SHORT, ComponentUtil.asArray(calendar.getWeekDayLabelsShort()));
    utils.addToScriptHash(map, MONTH_LABELS, ComponentUtil.asArray(calendar.getMonthLabels()));
    utils.addToScriptHash(map, MONTH_LABELS_SHORT, ComponentUtil.asArray(calendar.getMonthLabelsShort()));
    int day = calendar.getFirstWeekDay();
    if (0 <= day && day <= 6) {
      utils.addToScriptHash(map, "firstWeekDay", day);     
    } else if (day != Integer.MIN_VALUE) {
      facesContext.getExternalContext()
View Full Code Here

    utils.addToScriptHash(map, WEEK_DAY_LABELS_SHORT, ComponentUtil.asArray(calendar.getWeekDayLabelsShort()));
    utils.addToScriptHash(map, MONTH_LABELS, ComponentUtil.asArray(calendar.getMonthLabels()));
    utils.addToScriptHash(map, MONTH_LABELS_SHORT, ComponentUtil.asArray(calendar.getMonthLabelsShort()));
    int day = calendar.getFirstWeekDay();
    if (0 <= day && day <= 6) {
      utils.addToScriptHash(map, "firstWeekDay", day);     
    } else if (day != Integer.MIN_VALUE) {
      facesContext.getExternalContext()
        .log(day + " value of firstWeekDay attribute is not a legal one for component: "
            + MessageUtil.getLabel(facesContext, calendar) + ". Default value was applied.");
    }
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.