Hi,
We have a strange case for a subscription's property referencing a
Contact (Apache Isis 1.14.x).
The database tells me it has a reference to Contact with id 1, but
Contact with id 5 is displayed in the Wicket viewer. So when I ask the
subscription for it's contact programmatically it will return Contact 1
but the Wicket viewer displays number 5. In this case an email was sent
to the contact as referenced in the database, while a user expected an
email to be sent to the other Contact.
This happens when Contact number 1 is not present in the choices for
editing the Contact property (probably because of changed business rules
or another system updating the same database). Before [1] the entityLink
has a reference to the right Contact but after [1] it is overwritten by
the first item of the choices.
It probably depends on the use case what the behaviour should be, but
in this case I expected Contact number 1. The question is: should the
current selected item always be in the list of choices or should it be
ignored if it doesn't comply with the business rules? The last case can
give unexpected behaviour for people clicking the popup away using OK,
without noticing the selected item was different from the item that was
actually set. What happens in this case with inline editing?
Erik
[1]
https://github.com/apache/isis/blob/rel/isis-1.14.0/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.java#L128
- Unexpected behaviour for ReferencePanel Erik de Hair
-