/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { return super.execute(actionHandler, context); } }
wrapper.setNextAction(action); } else { wrapper = new FrontendAction<RComponent, RIcon, RAction>() { wrapper.setWrappedAction(action);
/** * Constructs a new {@code ExitAction} instance. */ public ExitAction() { actualExitAction = new FrontendAction<E, F, G>() { @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { return getController(context).stop(); } }; }
charAction = (IDisplayableAction) pagingAction; } else { charAction = new FrontendAction<>(); ((FrontendAction) charAction).setWrappedAction(pagingAction);
enumLovAction.setOkAction(enumLovOkFrontAction); enumLovOkFrontAction.setNextAction(new BackendAction() { @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) {
/** * Declares the action as being able to run on a collection containing more * than 1 element. A multiSelectionEnabled = false action will be disabled * when the selection contains no or more than one element. * * @param multiSelectionEnabled * the multiSelectionEnabled to set. */ public void setMultiSelectionEnabled(boolean multiSelectionEnabled) { this.multiSelectionEnabled = multiSelectionEnabled; completeActionabilityGates(); }
/** * Forwards to the delegate. * <p> * {@inheritDoc} */ @Override public String getAcceleratorAsString() { return delegate.getAcceleratorAsString(); }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (super.equals(obj)) { if (elementEntityDescriptor != null && obj instanceof AddCollectionToMasterAction<?, ?, ?>) { return elementEntityDescriptor .equals(((AddCollectionToMasterAction<?, ?, ?>) obj).elementEntityDescriptor); } return true; } return false; }
/** * Declares the action as working on a collection of objects. Collection based * actions will typically be installed on selectable views (table, list, tree) * and will be enabled only when the view selection is not empty (a default * gate is installed for this purpose). Moreover, model gates that are * configured on collection based actions take their model from the view * selected components instead of the view model itself. In case of * multi-selection enabled UI views, the actionability gates will actually * open if and only if their opening condition is met for all the selected * items. * * @param collectionBased * the collectionBased to set. */ public void setCollectionBased(boolean collectionBased) { this.collectionBased = collectionBased; completeActionabilityGates(); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { // To keep original context context.putAll(initialContext); return super.execute(actionHandler, context); } };
/** * Assigns a collection of gates to determine action <i>actionability</i>. An * action will be considered actionable (enabled) if and only if all gates are * open. This mechanism is mainly used for dynamic UI authorization based on * model state, e.g. a validated invoice should not be validated twice. * <p> * Action assigned gates will be cloned for each concrete action instance * created and bound to its respective UI component (usually a button). So * basically, each action instance will have its own, unshared collection of * actionability gates. * <p> * Jspresso provides a useful set of gate types, like the binary property gate * that open/close based on the value of a boolean property of the view model * the action is installed to. * <p> * By default, frontend actions are assigned a generic gate that closes * (disables the action) when the view is not assigned any model. * * @param actionabilityGates * the actionabilityGates to set. */ public void setActionabilityGates(Collection<IGate> actionabilityGates) { this.actionabilityGates = actionabilityGates; completeActionabilityGates(); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { // To keep original context context.putAll(initialContext); return super.execute(actionHandler, context); } };
/** * Completes the action context with the element entity descriptor * parametrized. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { Map<String, Object> varContext = context; if (varContext == null) { varContext = new HashMap<>(); } varContext.put(AddComponentCollectionToMasterAction.ELEMENT_DESCRIPTOR, getElementEntityDescriptor(context)); return super.execute(actionHandler, varContext); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { Object selectedModels = getActionParameter(context); if (!(selectedModels instanceof Collection<?>)) { selectedModels = Collections.singleton(selectedModels); } setSelectedModels((Collection<?>) selectedModels, context); return super.execute(actionHandler, context); } }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { Object previousActionResult = getActionParameter(context); IValueConnector connector = (IValueConnector) context .get(connectorActionContextKey); // the following will force a connector value change event. // connector.setConnectorValue(null); connector.setConnectorValue(previousActionResult); return super.execute(actionHandler, context); }
/** * Gets the current module and restarts it. {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { Module module = getModule(context); boolean startupResult = restartModule(module, actionHandler, context); return startupResult && super.execute(actionHandler, context); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { IAction action = getActionParameter(context); return actionHandler.execute(action, context) && super.execute(actionHandler, context); }
/** * Displays the previous pinned module. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { Boolean blockBackwardNavigation = (Boolean) context.get(BLOCK_BACKWARD_MODULE_NAVIGATION); if (blockBackwardNavigation == null || !blockBackwardNavigation) { getController(context).displayPreviousPinnedModule(); } return super.execute(actionHandler, context); } }
/** * Displays the next pinned module. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { getController(context).displayNextPinnedModule(); return super.execute(actionHandler, context); } }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { setActionParameter(getSelectedModels(context), context); return super.execute(actionHandler, context); } }