/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { IAction action = (IAction) context.get(ActionContextConstants.ACTION_PARAM); return actionHandler.execute(action, context) && super.execute(actionHandler, context); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (actionHandler.execute(wrappedAction, context)) { if (getNextAction(context) != null) { return super.execute(actionHandler, context); } return true; } return false; }
/** * Selects indices on the view collection connector based on the * <code>ActionContextConstants.SELECTED_INDICES</code> context value. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { ICollectionConnector collectionConnector = (ICollectionConnector) getSourceViewConnector(context); if (collectionConnector == null) { collectionConnector = (ICollectionConnector) getViewConnector(context); } int[] connectorSelection = (int[]) context .get(ActionContextConstants.SELECTED_INDICES); collectionConnector.setSelectedIndices(connectorSelection); return super.execute(actionHandler, context); } }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { BasicCollectionDescriptor<IReport> modelDescriptor = new BasicCollectionDescriptor<IReport>(); modelDescriptor.setCollectionInterface(List.class); modelDescriptor.setElementDescriptor(BasicReportDescriptor.INSTANCE); IValueConnector reportsConnector = modelConnectorFactory .createModelConnector("ActionModel", modelDescriptor); reportsConnector.setConnectorValue(createReportInstances( getTranslationProvider(context), getLocale(context))); context.put(ActionContextConstants.ACTION_PARAM, reportsConnector); return super.execute(actionHandler, context); }
/** * Selects indices on the module view collection connector based on the * <code>ActionContextConstants.SELECTED_INDICES</code> context value. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { ICompositeValueConnector moduleConnector = getModuleConnector(context); ICollectionConnector parentModuleCollectionConnector = ((ICollectionConnectorProvider) moduleConnector .getParentConnector().getParentConnector()).getCollectionConnector(); parentModuleCollectionConnector.setSelectedIndices(new int[0]); int[] connectorSelection = (int[]) context .get(ActionContextConstants.SELECTED_INDICES); if (moduleConnector instanceof ICollectionConnectorProvider) { ICollectionConnector collectionConnector = ((ICollectionConnectorProvider) moduleConnector) .getCollectionConnector(); collectionConnector.setSelectedIndices(connectorSelection); } return super.execute(actionHandler, context); } }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { BasicCollectionDescriptor<IDescriptor> modelDescriptor = new BasicCollectionDescriptor<IDescriptor>(); modelDescriptor.setCollectionInterface(List.class); modelDescriptor.setElementDescriptor(BasicDescriptorDescriptor.INSTANCE); modelDescriptor.setName(ACTION_MODEL_NAME); IValueConnector actionsConnector = modelConnectorFactory .createModelConnector(ACTION_MODEL_NAME, modelDescriptor); actionsConnector.setConnectorValue(createActionProxies( getTranslationProvider(context), getLocale(context))); context.put(ActionContextConstants.ACTION_PARAM, actionsConnector); return super.execute(actionHandler, context); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { ICollectionConnector viewConnector = (ICollectionConnector) getViewConnector(context); int[] selectedIndices = viewConnector.getSelectedIndices(); ICollectionConnector collectionConnector = (ICollectionConnector) viewConnector .getModelConnector(); if (selectedIndices == null || selectedIndices.length == 0 || collectionConnector == null) { return false; } Object reportDescriptorOrReport = collectionConnector.getChildConnector( selectedIndices[0]).getConnectorValue(); IReport report = null; if (reportDescriptorOrReport instanceof IReport) { report = (IReport) reportDescriptorOrReport; } else if (reportDescriptorOrReport instanceof IReportDescriptor) { report = reportFactory.createReportInstance( (IReportDescriptor) reportDescriptorOrReport, getTranslationProvider(context), getLocale(context)); } context.put(ActionContextConstants.ACTION_PARAM, report); return super.execute(actionHandler, context); }