Author: Alex.Kolonitsky
Date: 2009-07-24 09:21:35 -0400 (Fri, 24 Jul 2009)
New Revision: 15003
Modified:
branches/community/3.3.X/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java
Log:
contextMenu: onmousemove, onmouseout and onmouseover attributes don't work
https://jira.jboss.org/jira/browse/RF-7497
Modified:
branches/community/3.3.X/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java
===================================================================
---
branches/community/3.3.X/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java 2009-07-24
10:55:46 UTC (rev 15002)
+++
branches/community/3.3.X/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java 2009-07-24
13:21:35 UTC (rev 15003)
@@ -130,11 +130,18 @@
styleClass = "";
}
- writer.writeAttribute(HTML.onmousemove_ATTRIBUTE,
layer.getAttributes().get("onmousemove"), null);
- writer.writeAttribute(HTML.onmouseout_ATTRIBUTE,
layer.getAttributes().get("onmouseout"), null);
- writer.writeAttribute(HTML.onmouseover_ATTRIBUTE,
layer.getAttributes().get("onmouseover"), null);
+ writeAttr(writer, HTML.onmousemove_ATTRIBUTE,
layer.getAttributes().get("onmousemove"));
+ writeAttr(writer, HTML.onmouseout_ATTRIBUTE,
layer.getAttributes().get("onmouseout"));
+ writeAttr(writer, HTML.onmouseover_ATTRIBUTE,
layer.getAttributes().get("onmouseover"));
writer.writeAttribute(HTML.class_ATTRIBUTE, "rich-menu-list-border " +
styleClass, null);
writer.writeAttribute(HTML.style_ATTRIBUTE, "display: none; z-index: 2; " +
style, null);
}
+
+ private void writeAttr(ResponseWriter writer, final String name, final Object value)
throws IOException {
+ if (value != null) {
+ writer.writeAttribute(name, value, null);
+ }
+
+ }
}