You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Andi Huber (Jira)" <ji...@apache.org> on 2022/02/02 08:26:00 UTC

[jira] [Commented] (ISIS-2946) Allow option to have Boolean scalar values toggle

    [ https://issues.apache.org/jira/browse/ISIS-2946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17485628#comment-17485628 ] 

Andi Huber commented on ISIS-2946:
----------------------------------

Quote from the Slack channel:

Several aspects to consider:
- BooleanPanel appear when viewing or editing a boolean Property, supporting 3 dialog options: INLINE, MODAL, SIDEBAR
- BooleanPanel appear when viewing or editing a boolean Action Parameter, supporting 4 dialog options: INLINE, MODAL, SIDEBAR, INLINE_AS_IF_EDIT
- Editing the value of a boolean Property must trigger - what we framework specifically call - an Execution. Executions trigger domain events and validate the desired change of the given Property. If validation fails, a validation message must be fed back to the UI for the user to see and confirm.

With 2.0.0-M7 (not released yet, but we are close) the execution and validation is abstracted away from the Wicket Viewer. We do now have convenient models that handle all that stuff. These models are:
- org.apache.isis.core.metamodel.interactions.managed.PropertyNegotiationModel
- org.apache.isis.core.metamodel.interactions.managed.ParameterNegotiationModel

At this point, these new models are not well documented, but I can recommend eg. org.apache.isis.testdomain.util.interaction.DomainObjectTesterFactory from our regression tests, to study how all connects.

We do have a bunch of regression tests that do use these new models (independent of the Wicket Viewer). Package:
org.apache.isis.testdomain.interact

All that said, I don't believe that you need to dive into the depth of the meta-model and its Facets, when writing viewer components. All you need should be provided via those new negotiation models above. Facets are very low level, and really just an implementation detail of the meta-model, also subject to change without notice. Hence we have layers of abstraction.

> Allow option to have Boolean scalar values toggle
> -------------------------------------------------
>
>                 Key: ISIS-2946
>                 URL: https://issues.apache.org/jira/browse/ISIS-2946
>             Project: Isis
>          Issue Type: Wish
>          Components: Isis Viewer Wicket
>    Affects Versions: 2.0.0-M6
>            Reporter: Brian Kalbfus
>            Priority: Minor
>
> For a Boolean value to be toggled, it takes the following user actions:
>    1. Click on the "Yes/no" text next to the checkbox
>    2. Since the page just refreshed, scroll down to where the property was
>    3. Click on the checkbox
>    4. Click on the "OK" button
>    5. Since the page just refreshed again, scroll down to see that your change took
>  
> It seems to me that a user usually expects to be able to update a checkbox with a single action and the current behavior is the result of building in a confirmation feature into the Wicket module.  For those who would prefer skip the confirmation step, we can have updates occur automatically.  This would make the checkbox intuitive and allow updates of other scalars without a submit button.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)