From 6267bfbe4aa5f767215e32b4529f5e1b6014b1bc Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Wed, 4 Jul 2007 16:30:07 +0000 Subject: [PATCH] Fix for AWC-1320 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6168 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../web/ui/repo/component/UINodeInfo.java | 27 ++++++++++--------- .../web/ui/repo/component/UIOpenSearch.java | 3 +++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/source/java/org/alfresco/web/ui/repo/component/UINodeInfo.java b/source/java/org/alfresco/web/ui/repo/component/UINodeInfo.java index 9ef518ea1e..bb2d017a88 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UINodeInfo.java +++ b/source/java/org/alfresco/web/ui/repo/component/UINodeInfo.java @@ -85,18 +85,7 @@ public class UINodeInfo extends SelfRenderingComponent { ResponseWriter out = context.getResponseWriter(); - // write out the JavaScript specific to the NodeInfo component, - // make sure it's only done once - Object present = context.getExternalContext().getRequestMap(). - get(NODE_INFO_SCRIPTS_WRITTEN); - if (present == null) - { - out.write(""); - - context.getExternalContext().getRequestMap().put( - NODE_INFO_SCRIPTS_WRITTEN, Boolean.TRUE); - } + outputNodeInfoScripts(context, out); // wrap the child components in a that has the onmouseover // event which kicks off the request for node information @@ -108,6 +97,20 @@ public class UINodeInfo extends SelfRenderingComponent } } + protected static void outputNodeInfoScripts(FacesContext context, ResponseWriter out) throws IOException + { + // write out the JavaScript specific to the NodeInfo component, ensure it's only done once + Object present = context.getExternalContext().getRequestMap().get(NODE_INFO_SCRIPTS_WRITTEN); + if (present == null) + { + out.write(""); + + context.getExternalContext().getRequestMap().put( + NODE_INFO_SCRIPTS_WRITTEN, Boolean.TRUE); + } + } + @Override public void encodeEnd(FacesContext context) throws IOException { diff --git a/source/java/org/alfresco/web/ui/repo/component/UIOpenSearch.java b/source/java/org/alfresco/web/ui/repo/component/UIOpenSearch.java index b0a5e6f10b..5350083f64 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UIOpenSearch.java +++ b/source/java/org/alfresco/web/ui/repo/component/UIOpenSearch.java @@ -96,6 +96,9 @@ public class UIOpenSearch extends SelfRenderingComponent context.getExternalContext().getRequestMap().put(SCRIPTS_WRITTEN, Boolean.TRUE); } + // we use summary info panel pop-ups so need scripts for that object + UINodeInfo.outputNodeInfoScripts(context, out); + // write out the javascript initialisation required out.write("