use of org.jowidgets.cap.ui.api.model.IDataModelContextProvider in project jo-client-platform by jo-source.
the class CreatorActionBuilderImpl method buildAction.
private IAction buildAction() {
final IBeanFormBluePrint<BEAN_TYPE> formBp = getBeanFormBp();
Collection<IAttribute<?>> attr = attributes;
if (attr == null && formBp != null) {
attr = formBp.getCreateModeAttributes();
}
final BeanCreatorCommand<BEAN_TYPE> command = new BeanCreatorCommand<BEAN_TYPE>(beanTypeId, beanType, beanPropertyValidators, model, attr, formBp, enabledCheckers, anySelection, creatorService, parentBeanKeysProvider, getDefaultValueProvider(attr), exceptionConverter, executionInterceptors, creatorInterceptors);
final IActionBuilder builder = getBuilder();
if (model instanceof IDataModelContextProvider) {
builder.setCommand(new DataModelContextCommandWrapper((IDataModelContextProvider) model, DataModelChangeType.SELECTION_CHANGE, command));
} else {
builder.setCommand((ICommand) command);
}
return builder.build();
}
use of org.jowidgets.cap.ui.api.model.IDataModelContextProvider in project jo-client-platform by jo-source.
the class DeleterActionBuilder method buildAction.
private IAction buildAction() {
setDefaultTextIfNecessary();
setDefaultToolTipTextIfNecessary();
final BeanDeleterCommand<BEAN_TYPE> command = new BeanDeleterCommand<BEAN_TYPE>(model, enabledCheckers, executableCheckers, deleterService, executionInterceptors, multiSelection, beanModificationStatePolicy, beanMessageStatePolicy, exceptionConverter, autoSelection, deletionConfirmDialog);
final IActionBuilder builder = getBuilder();
if (model instanceof IDataModelContextProvider) {
builder.setCommand(new DataModelContextCommandWrapper((IDataModelContextProvider) model, DataModelChangeType.SELECTION_CHANGE, command));
} else {
builder.setCommand((ICommand) command);
}
return builder.build();
}
use of org.jowidgets.cap.ui.api.model.IDataModelContextProvider in project jo-client-platform by jo-source.
the class PasteBeansActionBuilderImpl method doBuild.
@Override
public IAction doBuild() {
final BeanPasteCommand<BEAN_TYPE> command = new BeanPasteCommand<BEAN_TYPE>(beanTypeId, beanType, model, disposeObservable, attributes, enabledCheckers, anySelection);
final IActionBuilder builder = getBuilder();
if (model instanceof IDataModelContextProvider) {
builder.setCommand(new DataModelContextCommandWrapper((IDataModelContextProvider) model, DataModelChangeType.SELECTION_CHANGE, command));
} else {
builder.setCommand((ICommand) command);
}
return builder.build();
}
Aggregations