diff --git a/src/main/config/component/dock.xml b/src/main/config/component/dock.xml index e3271c1..cd8c3b6 100644 --- a/src/main/config/component/dock.xml +++ b/src/main/config/component/dock.xml @@ -12,6 +12,9 @@ with the cursor, and usually perform some action when clicked. This plugin mimics that behaviour by transforming a contiguous set of HTML images into an expanding Dock, vertical or horizontal, with or without labels. + + Note that this component will not work if it's children render anything else except "<script>", "<a>" + or "<img>". org.richfaces.DockRenderer diff --git a/src/main/java/org/richfaces/renderkit/html/DockRenderer.java b/src/main/java/org/richfaces/renderkit/html/DockRenderer.java index 755d20d..96ce2dd 100644 --- a/src/main/java/org/richfaces/renderkit/html/DockRenderer.java +++ b/src/main/java/org/richfaces/renderkit/html/DockRenderer.java @@ -100,7 +100,9 @@ public class DockRenderer extends HeaderResourcesRendererBase { Object styleClass = component.getAttributes().get("styleClass"); styleClass = styleClass == null ? "" : " " + styleClass.toString(); writer.writeAttribute(HTML.class_ATTRIBUTE, "rf-dk" + styleClass, HTML.class_ATTRIBUTE); - writer.writeAttribute(HTML.style_ATTRIBUTE, component.getAttributes().get("style"), HTML.style_ATTRIBUTE); + Object style = component.getAttributes().get("style"); + style = style == null ? "" : style.toString(); + writer.writeAttribute(HTML.style_ATTRIBUTE, "display:none;" + style, HTML.style_ATTRIBUTE); } @Override