Skip to content

Commit

Permalink
JNG-5761-fix association table edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg committed Jun 12, 2024
1 parent 38c293d commit 3c8c823
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,13 @@ public static String tableButtonVisibilityConditions(Button button, Table table,
if (button.getActionDefinition().getIsOpenCreateFormAction() && !table.isIsEager() && container.isView()) {
return "!editMode && (isFormUpdateable ? isFormUpdateable() : false)";
}
if (button.getActionDefinition().getIsOpenSelectorAction() && container.isView()) {
return "(isFormUpdateable ? isFormUpdateable() : false)";
if (container.isView()) {
if (button.getActionDefinition().getIsOpenSelectorAction() || button.getActionDefinition().getIsRemoveAction()) {
return "(isFormUpdateable ? (isFormUpdateable()" + (!table.isIsEager() ? "&& !editMode" : "") + ") : false)";
}
if (button.getActionDefinition().getIsBulkRemoveAction() || button.getActionDefinition().getIsClearAction()) {
return "(isFormUpdateable ? (isFormUpdateable()" + (!table.isIsEager() ? "&& !editMode" : "") + " && selectionModel.length > 0) : false)";
}
}
if (button.getActionDefinition().getIsClearAction()) {
String result = "data.length > 0";
Expand Down

0 comments on commit 3c8c823

Please sign in to comment.