[midPoint-git] [Evolveum/midpoint] 98df6d: Cleanup permissions confirmation dialog panel
Andrej
noreply at github.com
Tue Mar 10 08:50:36 CET 2026
Branch: refs/heads/bugfix/t-4502-confirmation-options
Home: https://github.com/Evolveum/midpoint
Commit: 98df6deade28e3a15312e9ed1b9903b1b87a045c
https://github.com/Evolveum/midpoint/commit/98df6deade28e3a15312e9ed1b9903b1b87a045c
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-03-10 (Tue, 10 Mar 2026)
Changed paths:
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/MultiSelectContainerActionTileTablePanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/AssociationTypesPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/SchemaHandlingObjectsPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/attribute/mapping/AttributeMappingsTableWizardPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/CorrelationItemsTableWizardPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/SmartCorrelationTable.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartAlertGeneratingPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/page/SmartObjectTypeSuggestionWizardPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/table/SmartObjectTypeSuggestionPanel.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationOption.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsDto.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsPanel.html
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsPanel.java
R gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/DataAccessPermission.java
R gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/RequestDetailsConfirmationPanel.html
R gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/RequestDetailsConfirmationPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/RequestDetailsRecordDto.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/privacy/DataAccessPermission.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/util/Describable.java
Log Message:
-----------
Cleanup permissions confirmation dialog panel
**What**
Cleanup the dialog panel, which is used (mainly) to confirm data access
permissions.
**Why**
- The panel and its content had a very confusing naming (considering
very dynamic nature of development, it is understandable).
Hopefully I have been more lucky with naming this time.
- The panel was customized by overriding methods also for such
customizations which could be made through static "configuration" via
the panel's model. That in my opinion helps with clarity a lot.
- The panel contained defaults, which were too specific and
were not suitable for their generic nature. These default were then
overridden in some cases, but in some they were not. That made things
very hard to navigate. I tried to remove such defaults.
- The default messages (these which are not too specific) are defined in
the panel's model instead of the panel's component code.
**Task**: 11118
Commit: 38c5ac32aaa29181aff73185c440962180aac9e7
https://github.com/Evolveum/midpoint/commit/38c5ac32aaa29181aff73185c440962180aac9e7
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-03-10 (Tue, 10 Mar 2026)
Changed paths:
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/AssociationTypesPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/SchemaHandlingObjectsPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/attribute/mapping/AttributeMappingsTableWizardPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/correlation/CorrelationItemsTableWizardPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartAlertGeneratingPanel.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/schemaHandling/objectType/smart/component/SmartSuggestButtonWithConfirmation.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ConfirmationWithOptionsPanel.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/input/ButtonWithConfirmationOptionsDialog.java
Log Message:
-----------
Create "smart generate button" component
**What**
Create two new button components. One is a generic button, which upon
click shows a confirmation dialog with optional confirmation options.
The second button uses that to implement a "generate" button,
encapsulating common confirmation dialog texts and messages.
This change also integrates this new "smart" button into the
`SmartAlertGeneratingPanel` panel.
**Why**
Currently, the confirmation dialog has been explicitly defined in many
places, which deals with the suggestions generation. That makes things
quite complex and hard to navigate.
I think that moving the dialog creation and logic into the button itself
simplifies it.
**Notes**
This commit integrates the button just to one panel
(`SmartAlertGeneratingPanel`) which is in turn used by many other
pages. Later commits will integrate this panel also to other places.
Some notes regarding the implementation.
I have decided, that in contrast to the usual practice in our GUI code
(and in Wicket code in general), I will not allow customization of the
button through the overriding mechanism by subclasses (other then the
required public `onClick` method). Instead I leveraged customization by
composition.
To customize certain actions (currently just two), the client can supply
the wished actions as a handler functions (consumer and bi-consumer to
be precise), via the button's model object during the instantiation.
That has several benefits:
- **Easier navigation through the code**: It is often very hard to
navigate all the overridden methods in a big inheritance hierarchy. I
believe this approach makes that a bit easier.
- **Composition over inheritance practice**: It is widely recognized
these days, that it is better to utilize composition whenever we can
instead of relying on inheritance. Unfortunately the Wicket framework
does the opposite (maybe given the web domain it's understandable, I
don't know). Anyway, I believe, that aside of the parts where Wickets
forces us to use inheritance, or parts where the inheritance give us
some big undoubted benefit, we should try to avoid it.
- **Less code on the client side**: If the initializers/builders are
written in a good way, this approach can reduce the boiler plate
required by the anonymous implementations.
There is one drawback though. Specifying that specification of some
function is **required** is not so easy as defining `abstract` method.
However, there are mechanisms (e.g. "staged builder") which allows to
overcome this issue. I may introduce it in later commits to make sure,
that the "confirmation click" handler is always specified.
Compare: https://github.com/Evolveum/midpoint/compare/98df6deade28%5E...38c5ac32aaa2
To unsubscribe from these emails, change your notification settings at https://github.com/Evolveum/midpoint/settings/notifications
More information about the midPoint-svn
mailing list