use of com.vaadin.ui.ComponentContainer in project cuba by cuba-platform.
the class WebRelatedEntities method refreshNavigationActions.
protected void refreshNavigationActions() {
ComponentContainer actionContainer = (ComponentContainer) vPopupComponent;
actionContainer.removeAllComponents();
actionOrder.clear();
if (listComponent != null) {
MetaClass metaClass = listComponent.getDatasource().getMetaClass();
Pattern excludePattern = null;
if (excludeRegex != null) {
excludePattern = Pattern.compile(excludeRegex);
}
for (MetaProperty metaProperty : metaClass.getProperties()) {
if (RelatedEntitiesSecurity.isSuitableProperty(metaProperty, metaClass) && (excludePattern == null || !excludePattern.matcher(metaProperty.getName()).matches())) {
addNavigationAction(metaClass, metaProperty);
}
}
if (actionContainer.getComponentCount() == 0) {
Messages messages = AppBeans.get(Messages.NAME);
actionContainer.addComponent(new Label(messages.getMainMessage("actions.Related.Empty")));
}
}
}
use of com.vaadin.ui.ComponentContainer in project linkki by linkki-framework.
the class BindingContext method removeBindingsForComponent.
/**
* Removes all bindings in this context that refer to the given component. If the component is a
* container component, all bindings for the components children and their children are removed,
* too.
*/
public void removeBindingsForComponent(Component c) {
elementBindings.remove(c);
tableBindings.remove(c);
if (c instanceof ComponentContainer) {
ComponentContainer container = (ComponentContainer) c;
container.iterator().forEachRemaining(this::removeBindingsForComponent);
}
}
Aggregations