use of de.metas.ui.web.handlingunits.HUEditorView in project metasfresh-webui-api by metasfresh.
the class WEBUI_M_HU_Transform method updateViewFromResult.
private final void updateViewFromResult(final WebuiHUTransformCommandResult result) {
final HUEditorView view = getView();
boolean changes = false;
if (view.addHUIds(result.getHuIdsToAddToView())) {
changes = true;
}
if (view.removeHUIds(result.getHuIdsToRemoveFromView())) {
changes = true;
}
if (!result.getHuIdsChanged().isEmpty()) {
removeHUsIfDestroyed(result.getHuIdsChanged());
changes = true;
}
if (removeSelectedRowsIfHUDestoyed()) {
changes = true;
}
//
if (changes) {
view.invalidateAll();
}
}
use of de.metas.ui.web.handlingunits.HUEditorView in project metasfresh-webui-api by metasfresh.
the class HUReportProcessInstancesRepository method checkApplies.
private boolean checkApplies(final WebuiHUProcessDescriptor descriptor, @NonNull ViewAsPreconditionsContext viewContext) {
final DocumentIdsSelection rowIds = viewContext.getSelectedRowIds();
if (rowIds.isEmpty()) {
return false;
}
final HUEditorView huView = viewContext.getView(HUEditorView.class);
final boolean foundNotMatchingRows = huView.streamByIds(rowIds).anyMatch(row -> !checkApplies(row, descriptor));
return !foundNotMatchingRows;
}
Aggregations