List of usage examples for com.vaadin.ui ComponentContainer replaceComponent
public void replaceComponent(Component oldComponent, Component newComponent);
From source file:org.opencms.ui.sitemap.CmsSitemapTreeController.java
License:Open Source License
/** * Updates a sitemap node widget after the resource it corresponds to has changed.<p> * * @param node the sitemap node/* w w w . j a v a2 s . c o m*/ */ public void updateNode(CmsSitemapTreeNode node) { CmsSitemapTreeNodeData data = (CmsSitemapTreeNodeData) node.getData(); try { CmsSitemapTreeNodeData changedData = m_treeDataProvider.getData(A_CmsUI.getCmsObject() .readResource(data.getClientEntry().getId(), CmsResourceFilter.IGNORE_EXPIRATION)); CmsSitemapTreeNode changedNode = createNode(changedData); initEventHandlers(changedNode); ComponentContainer parent = (ComponentContainer) (node.getParent()); parent.replaceComponent(node, changedNode); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); } }