I did notice in the NormalModeSerializer the following snippet:
if (isFragment(requestMap)) {
if (log.isDebugEnabled())
{
log.debug("treating request as a fragment");
}
Node body = DOMUtils.getChildByNodeName(
document.getDocumentElement(), "body");
if (null != body)
{
//insert a containing element for bridge anchoring
writer.write("<div>\n");
//We need to include, for now, ICE_EXTRAS all the time to
//ensure that it is available.
writer.write(makeScriptEntry(JavascriptContext.ICE_BRIDGE));
writer.write(makeScriptEntry(JavascriptContext.ICE_EXTRAS));
writer.write(DOMUtils.childrenToString(body));
writer.write("</div>\n");
}
This does get run in portlets (which are basically treated as fragments). So I added this:
String[] jsLibs = JavascriptContext.getIncludedLibs(context);
for (int i = 0; i < jsLibs.length; i++)
{
String jsLib = jsLibs[i];
writer.write(makeScriptEntry(jsLib));
}
Which seemed to get the Google components working as that is how they add the script library. But our Rich Text Component seems to do something else (not using the JavaScriptContext).
I did notice in the NormalModeSerializer the following snippet:
if (isFragment(requestMap)) {
{ log.debug("treating request as a fragment"); }if (log.isDebugEnabled())
Node body = DOMUtils.getChildByNodeName(
{ //insert a containing element for bridge anchoring writer.write("<div>\n"); //We need to include, for now, ICE_EXTRAS all the time to //ensure that it is available. writer.write(makeScriptEntry(JavascriptContext.ICE_BRIDGE)); writer.write(makeScriptEntry(JavascriptContext.ICE_EXTRAS)); writer.write(DOMUtils.childrenToString(body)); writer.write("</div>\n"); }document.getDocumentElement(), "body");
if (null != body)
This does get run in portlets (which are basically treated as fragments). So I added this:
String[] jsLibs = JavascriptContext.getIncludedLibs(context);
{ String jsLib = jsLibs[i]; writer.write(makeScriptEntry(jsLib)); }for (int i = 0; i < jsLibs.length; i++)
Which seemed to get the Google components working as that is how they add the script library. But our Rich Text Component seems to do something else (not using the JavaScriptContext).