@Override public void collectionChanged(CollectionDatasource.CollectionChangeEvent e) { for (Action action : actionsHolder.getActions()) { action.refreshState(); } }
@Override public void stateChanged(Datasource.StateChangeEvent e) { for (Action action : actionsHolder.getActions()) { action.refreshState(); } }
@Override public void itemChanged(Datasource.ItemChangeEvent e) { for (Action action : actionsHolder.getActions()) { action.refreshState(); } }
@Override public void itemPropertyChanged(Datasource.ItemPropertyChangeEvent e) { for (Action action : actionsHolder.getActions()) { action.refreshState(); } }
@Override protected void addAction(Action action) { ActionsHolder actionsHolder = (ActionsHolder) component; List<Action> existingActions = new ArrayList<>(actionsHolder.getActions()); for (Action existingAction : existingActions) { // Comparing the id of an existing action with the full Id (including path) of the action to be added if (Objects.equals(existingAction.getId(), actionId)) { int index = existingActions.indexOf(existingAction); actionsHolder.removeAction(existingAction); actionsHolder.addAction(action, index); break; } } } }