getWidgetDefaultModule(protocol).closingContainer();
Element spanElement = closeSpanElement(protocol);
InlineContainerAttributes inlineContainerAttributes = (InlineContainerAttributes) attributes;
// Prepare Javascript Container.
StringBuffer buffer = new StringBuffer();
// Finally, render the JavaScript part.
if (attributes.getId() != null) {
buffer.append("Widget.register(")
.append(createJavaScriptString(attributes.getId()))
.append(",");
addCreatedWidgetId(attributes.getId());
}
buffer.append("new Widget.Internal.InlineContainer(")
.append(createJavaScriptString(spanElement.getAttributeValue("id")));
if (inlineContainerAttributes.getContent() != null) {
buffer.append(",{content:")
.append("Widget.getInstance(")
.append(createJavaScriptString(inlineContainerAttributes.getContent()))
.append(")}");
addUsedWidgetId(inlineContainerAttributes.getContent());
}
buffer.append(")");
// Render closing parentheses for Widget.Register invokation