@SuppressWarnings("unchecked") @Override public void actionPerform(Component component) { // if standard behaviour if (!hasSubscriptions(ActionPerformedEvent.class)) { Screen lookupScreen = screenBuilders.lookup(target) .build(); lookupScreen.show(); } else { super.actionPerform(component); } } }
@Override public void actionPerform(Component component) { if (!hasSubscriptions(ActionPerformedEvent.class)) { if (!(target.getItems() instanceof ContainerDataUnit)) { throw new IllegalStateException("RefreshAction target is null or does not implement SupportsContainerBinding"); } CollectionContainer container = ((ContainerDataUnit) target.getItems()).getContainer(); if (container == null) { throw new IllegalStateException("RefreshAction target is not bound to CollectionContainer"); } DataLoader loader = null; if (container instanceof HasLoader) { loader = ((HasLoader) container).getLoader(); } if (loader != null) { loader.load(); } else { log.warn("RefreshAction '{}' target container has no loader, refresh is impossible", getId()); } } else { super.actionPerform(component); } } }
@SuppressWarnings("unchecked") @Override public void actionPerform(Component component) { // if standard behaviour if (!hasSubscriptions(ActionPerformedEvent.class)) { if (!(target.getItems() instanceof EntityDataUnit)) { throw new IllegalStateException("CreateAction target items is null or does not implement EntityDataUnit"); } MetaClass metaClass = ((EntityDataUnit) target.getItems()).getEntityMetaClass(); if (metaClass == null) { throw new IllegalStateException("Target is not bound to entity"); } Screen editor = screenBuilders.editor(target) .newEntity() .build(); editor.show(); } else { super.actionPerform(component); } } }
super.actionPerform(component);