List of usage examples for com.vaadin.ui Component markAsDirty
public void markAsDirty();
From source file:com.haulmont.cuba.web.toolkit.ui.CubaWidgetsTree.java
License:Apache License
protected void refreshRenderedComponents() { detachGeneratedComponents();//from w ww . j a va 2s. com nodeWidgets.clear(); itemIds.clear(); if (widgetBuilder != null) { // Iterates through hierarchical tree using a stack of iterators final Stack<Iterator<?>> iteratorStack = new Stack<>(); Collection<?> ids = rootItemIds(); if (ids != null) { iteratorStack.push(ids.iterator()); } while (!iteratorStack.isEmpty()) { // Gets the iterator for current tree level final Iterator<?> i = iteratorStack.peek(); // If the level is finished, back to previous tree level if (!i.hasNext()) { // Removes used iterator from the stack iteratorStack.pop(); } else { final Object itemId = i.next(); itemIds.add(itemId); Component c = widgetBuilder.buildWidget(this, itemId, areChildrenAllowed(itemId)); c.setParent(this); c.markAsDirty(); nodeWidgets.add(c); if (hasChildren(itemId) && areChildrenAllowed(itemId)) { iteratorStack.push(getChildren(itemId).iterator()); } } } } }
From source file:org.semanticsoft.vaaclipse.presentation.renderers.TrimBarRenderer.java
License:Open Source License
@Override public void removeChildGui(MUIElement child, MElementContainer<MUIElement> element) { if (!(child instanceof MTrimElement && (MElementContainer<?>) element instanceof MTrimBar)) return;/*w ww . j a v a 2 s .c om*/ super.removeChildGui(child, element); Component trimWidget = (Component) element.getWidget(); MTrimBar trimBar = (MTrimBar) (MElementContainer<?>) element; refreshVisibility(trimBar); trimWidget.markAsDirty(); }