@Override
public HtmlComponent createComponent(Object object, Class type) {
MetaSlot slot = (MetaSlot) getContext().getMetaObject();
HtmlBlockContainer container = new HtmlBlockContainer();
String tags = (String) object;
HtmlTextInput input = new HtmlTextInput();
if (getSize() != null) {
input.setSize(getSize());
}
input.setValue(tags);
input.bind(slot);
input.setId(input.getName());
TagCloudRenderer tagCloud = new TagCloudRenderer();
tagCloud.setClasses(getTagClasses());
tagCloud.setSortBy(getTagSort());
tagCloud.setLinkFormat("#");
tagCloud.setOnClick(getAction(input.getName()));
tagCloud.setOnDblClick(getAction(input.getName()));
Collection<UnitFileTag> tagList = getTags();
PresentationContext newContext = getContext().createSubContext(getContext().getMetaObject());
newContext.setProperties(new Properties());
newContext.setRenderMode(RenderMode.OUTPUT);
container.addChild(getScript());
container.addChild(input);
container.addChild(new HtmlText("<br/>", false));
HtmlText text =
new HtmlText(RenderUtils.getResourceString("RENDERER_RESOURCES",
"renderers.label.tags.are.space.separated"));
text.setClasses(getTextClasses());
container.addChild(text);
container.addChild(RenderKit.getInstance().renderUsing(tagCloud, newContext, tagList, tagList.getClass()));
return container;
}