List of usage examples for com.vaadin.shared.ui.menubar MenuBarConstants HTML_CONTENT_ALLOWED
String HTML_CONTENT_ALLOWED
To view the source code for com.vaadin.shared.ui.menubar MenuBarConstants HTML_CONTENT_ALLOWED.
Click Source Link
From source file:com.haulmont.cuba.web.widgets.addons.contextmenu.MenuBar.java
License:Apache License
/** Paint (serialise) the component for the client. */ @Override// ww w. j a v a2 s. c om public void paintContent(PaintTarget target) throws PaintException { target.addAttribute(MenuBarConstants.OPEN_ROOT_MENU_ON_HOWER, openRootOnHover); if (isHtmlContentAllowed()) { target.addAttribute(MenuBarConstants.HTML_CONTENT_ALLOWED, true); } target.startTag("options"); if (getWidth() > -1) { target.startTag("moreItem"); target.addAttribute("text", moreItem.getText()); if (moreItem.getIcon() != null) { target.addAttribute("icon", moreItem.getIcon()); } target.endTag("moreItem"); } target.endTag("options"); target.startTag("items"); // This generates the tree from the contents of the menu for (MenuItem item : getItems()) { paintItem(target, item); } target.endTag("items"); }