Package org.ajax4jsf.renderkit

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


  @Override
  protected Map<String, Object> getMenuOptions(UIComponent component) {
    Map<String, Object> options = super.getMenuOptions(component);
    RendererUtils utils = getUtils();
    utils.addToScriptHash(options, "onEvt", component.getAttributes().get("event"), "onmouseover");
    utils.addToScriptHash(options, "disabled", component.getAttributes().get("disabled"));
    return options;
  }
 
  public void encodeChildren(FacesContext context, UIComponent component)
View Full Code Here


  @Override
  protected Map<String, Object> getMenuOptions(UIComponent component) {
    Map<String, Object> options = super.getMenuOptions(component);
    RendererUtils utils = getUtils();
    utils.addToScriptHash(options, "onEvt", component.getAttributes().get("event"), "onmouseover");
    utils.addToScriptHash(options, "disabled", component.getAttributes().get("disabled"));
    return options;
  }
 
  public void encodeChildren(FacesContext context, UIComponent component)
      throws IOException {
View Full Code Here

            Map<String, Object> menuItemAttributes = menuItem.getAttributes();

            // create attributes string for item without parent
            Map<String, Object> attrMap = new HashMap<String, Object>(3);
      if (!isNestedInMenu(menuItem)) {
                rendererUtils.addToScriptHash(attrMap, "styleClass", menuItemAttributes.get(HTML.STYLE_CLASS_ATTR),
                  null, ScriptHashVariableWrapper.DEFAULT);

                rendererUtils.addToScriptHash(attrMap, "onselect", menuItemAttributes.get(HTML.onselect_ATTRIBUTE),
                      null, ScriptHashVariableWrapper.EVENT_HANDLER);
            }
View Full Code Here

            Map<String, Object> attrMap = new HashMap<String, Object>(3);
      if (!isNestedInMenu(menuItem)) {
                rendererUtils.addToScriptHash(attrMap, "styleClass", menuItemAttributes.get(HTML.STYLE_CLASS_ATTR),
                  null, ScriptHashVariableWrapper.DEFAULT);

                rendererUtils.addToScriptHash(attrMap, "onselect", menuItemAttributes.get(HTML.onselect_ATTRIBUTE),
                      null, ScriptHashVariableWrapper.EVENT_HANDLER);
            }

            //-----------------------------------
            StringBuilder scriptValue = new StringBuilder();
View Full Code Here

                scriptValue.append(";");
              }
              scriptValue.append("RichFaces.Menu.submitForm(event,this");
             
              Map<String, Object> scriptOptionsMap = new HashMap<String, Object>(5);
              rendererUtils.addToScriptHash(scriptOptionsMap, "a", attrMap, null, ScriptHashVariableWrapper.DEFAULT);
             
              Map<String, Object> paramsMap = getParamsAsMap(context, menuItem);
              rendererUtils.addToScriptHash(scriptOptionsMap, "p", paramsMap, null, ScriptHashVariableWrapper.DEFAULT);

              String target = (String) menuItemAttributes.get("target");
View Full Code Here

             
              Map<String, Object> scriptOptionsMap = new HashMap<String, Object>(5);
              rendererUtils.addToScriptHash(scriptOptionsMap, "a", attrMap, null, ScriptHashVariableWrapper.DEFAULT);
             
              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()) {
View Full Code Here

             
              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

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.