Author: abelevich
Date: 2007-10-24 06:12:00 -0400 (Wed, 24 Oct 2007)
New Revision: 3495
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
Log:
don't encode parameters if name == null
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
---
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-10-24
10:11:10 UTC (rev 3494)
+++
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-10-24
10:12:00 UTC (rev 3495)
@@ -107,18 +107,16 @@
UIParameter param = (UIParameter)child;
String name = param.getName();
- if (null == name) {
- throw new IllegalArgumentException(Messages.getMessage(
- Messages.UNNAMED_PARAMETER_ERROR, component.getClientId(context)));
+ if (name != null) {
+ Object value = param.getValue();
+ buff.append("params[");
+ buff.append(ScriptUtils.toScript(name));
+ buff.append("] = ");
+ buff.append(ScriptUtils.toScript(value));
+ buff.append(";");
+ params.add(buff.toString());
}
-
- Object value = param.getValue();
- buff.append("params[");
- buff.append(ScriptUtils.toScript(name));
- buff.append("] = ");
- buff.append(ScriptUtils.toScript(value));
- buff.append(";");
- params.add(buff.toString());
+
}
}
Show replies by date