From acf1af19684382d7b4c6a4cecb6c3b75a91546be Mon Sep 17 00:00:00 2001 From: Norbert Csaba Herczeg Date: Wed, 4 Sep 2024 13:42:04 +0200 Subject: [PATCH] JNG-5906 fix table mask for association bulk --- .../generator/react/UiPageContainerHelper.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java index ccd0a5ad..425b75ac 100644 --- a/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java +++ b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiPageContainerHelper.java @@ -225,13 +225,17 @@ public static MaskEntry getMaskForTable(Table table, PageDefinition pageDefiniti } } - for (Button button: table.getTableActionButtonGroup().getButtons()) { - if (button.getActionDefinition().getIsBulkCallOperationAction()) { - if (button.getHiddenBy() != null) { - mask.addPrimitives(button.getHiddenBy().getName()); - } - if (button.getEnabledBy() != null) { - mask.addPrimitives(button.getEnabledBy().getName()); + if (table.isIsEager()) { + // only add bulk action hidden and enabled by mask attributes for eager tables + // because such attributes can only come from the owner + for (Button button : table.getTableActionButtonGroup().getButtons()) { + if (button.getActionDefinition().getIsBulkCallOperationAction()) { + if (button.getHiddenBy() != null) { + mask.addPrimitives(button.getHiddenBy().getName()); + } + if (button.getEnabledBy() != null) { + mask.addPrimitives(button.getEnabledBy().getName()); + } } } }