You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Sander Ginn <sa...@ginn.it> on 2018/11/23 15:46:26 UTC

Warning a user based on input on action invocation

Hi,

We’ve had a number of support requests relating to new users of our application that are not yet fully familiar with their business process. 
We do not wish to invalidate input as many business rules are not clearly defined in a ‘correct/incorrect’ fashion, with many exceptions and special cases.

As a middle ground, I would like to propose an extension of the metamodel with a support method similar to validateXxx(), which renders the familiar dialog and warning message underneath the input field with another colour (yellow, probably) but does not block the user from completing the action.

Does anyone else consider this to be a useful addition, and if so, what would be a good method prefix? My first thought was warnXxx(), but that does not make a lot of sense syntactically; after all, we aren’t warning the action in question (as opposed to validate/hide/disableXxx()) but the user instead.

Best
Sander Ginn

Re: Warning a user based on input on action invocation

Posted by Vladimir Nišević <vn...@gmail.com>.
Yes, this feature would be great one!

In one application (non Isis but Eclipse RCP) we developed times ago, we
had UI style guide where each input field can have
warning/information/error depending on current user input (ideally giving
feedback on each keystroke or when list selection happened).
Additionaly,  whole dialog (if modal) can provide same feedback to user,
when e.g. multiple input values in their combination lead to invalid
state...

Would be interesting if this feedback/validation could be (partially?)
delegated to browser JS engine and so reduce network overhead but at the
same time keeping the beauty of Isis programming model?

Regs,Vladimir

Am Fr., 23. Nov. 2018, 17:06 hat Dan Haywood <da...@haywood-associates.co.uk>
geschrieben:

> Yeah, I think this is a great idea.
>
> How about "advise" as a prefix to me; as in we are providing advice.  Also
> sounds "softer" in tone than "warn".
>
> I guess it'll introduce a new phase ... hide, disable, validate, advise,
> executing, executed.  So might be quite a bit of work to implement, but I
> can see the value.
>
> What do others think?
>
> Thx
> Dan
>
> On Fri, 23 Nov 2018 at 15:56, Sander Ginn <sa...@ginn.it> wrote:
>
> > Hi,
> >
> > We’ve had a number of support requests relating to new users of our
> > application that are not yet fully familiar with their business process.
> > We do not wish to invalidate input as many business rules are not clearly
> > defined in a ‘correct/incorrect’ fashion, with many exceptions and
> special
> > cases.
> >
> > As a middle ground, I would like to propose an extension of the metamodel
> > with a support method similar to validateXxx(), which renders the
> familiar
> > dialog and warning message underneath the input field with another colour
> > (yellow, probably) but does not block the user from completing the
> action.
> >
> > Does anyone else consider this to be a useful addition, and if so, what
> > would be a good method prefix? My first thought was warnXxx(), but that
> > does not make a lot of sense syntactically; after all, we aren’t warning
> > the action in question (as opposed to validate/hide/disableXxx()) but the
> > user instead.
> >
> > Best
> > Sander Ginn
>

Re: Warning a user based on input on action invocation

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Yeah, I think this is a great idea.

How about "advise" as a prefix to me; as in we are providing advice.  Also
sounds "softer" in tone than "warn".

I guess it'll introduce a new phase ... hide, disable, validate, advise,
executing, executed.  So might be quite a bit of work to implement, but I
can see the value.

What do others think?

Thx
Dan

On Fri, 23 Nov 2018 at 15:56, Sander Ginn <sa...@ginn.it> wrote:

> Hi,
>
> We’ve had a number of support requests relating to new users of our
> application that are not yet fully familiar with their business process.
> We do not wish to invalidate input as many business rules are not clearly
> defined in a ‘correct/incorrect’ fashion, with many exceptions and special
> cases.
>
> As a middle ground, I would like to propose an extension of the metamodel
> with a support method similar to validateXxx(), which renders the familiar
> dialog and warning message underneath the input field with another colour
> (yellow, probably) but does not block the user from completing the action.
>
> Does anyone else consider this to be a useful addition, and if so, what
> would be a good method prefix? My first thought was warnXxx(), but that
> does not make a lot of sense syntactically; after all, we aren’t warning
> the action in question (as opposed to validate/hide/disableXxx()) but the
> user instead.
>
> Best
> Sander Ginn

Re: Warning a user based on input on action invocation

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Cleaning up ... I've raised
https://issues.apache.org/jira/browse/ISIS-2122 for
this idea.

On Fri, 23 Nov 2018 at 20:43, Andi Huber <ah...@apache.org> wrote:

> You can solve this by adding a boolean parameter to the action, not as
> pretty as a yellobackground advise, but at least works with what we already
> have:
>
> import org.apache.isis.applib.annotation.Action;
> import org.apache.isis.applib.annotation.Mixin;
> import org.apache.isis.applib.annotation.ParameterLayout;
>
> import lombok.RequiredArgsConstructor;
>
> @Mixin @RequiredArgsConstructor
> public class SimpleObject_advice {
>
>     private final SimpleObject holder;
>
>     @Action
>     public SimpleObject $$(
>             @ParameterLayout(named="input") String input,
>             @ParameterLayout(named="do it anyway") boolean doItAnyway) {
>
>         // some action here
>         return holder;
>     }
>
>     public String validate$$(String input, boolean doItAnyway) {
>         if(doItAnyway) {
>             return null;
>         }
>         return "not good, here's my advice to you ...";
>     }
> }
>
> Cheers, Andi
>
> On 2018/11/23 15:46:26, Sander Ginn <sa...@ginn.it> wrote:
> > Hi,
> >
> > We’ve had a number of support requests relating to new users of our
> application that are not yet fully familiar with their business process.
> > We do not wish to invalidate input as many business rules are not
> clearly defined in a ‘correct/incorrect’ fashion, with many exceptions and
> special cases.
> >
> > As a middle ground, I would like to propose an extension of the
> metamodel with a support method similar to validateXxx(), which renders the
> familiar dialog and warning message underneath the input field with another
> colour (yellow, probably) but does not block the user from completing the
> action.
> >
> > Does anyone else consider this to be a useful addition, and if so, what
> would be a good method prefix? My first thought was warnXxx(), but that
> does not make a lot of sense syntactically; after all, we aren’t warning
> the action in question (as opposed to validate/hide/disableXxx()) but the
> user instead.
> >
> > Best
> > Sander Ginn
>

Re: Warning a user based on input on action invocation

Posted by Andi Huber <ah...@apache.org>.
You can solve this by adding a boolean parameter to the action, not as pretty as a yellobackground advise, but at least works with what we already have:

import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.Mixin;
import org.apache.isis.applib.annotation.ParameterLayout;

import lombok.RequiredArgsConstructor;

@Mixin @RequiredArgsConstructor
public class SimpleObject_advice {

    private final SimpleObject holder;
    
    @Action
    public SimpleObject $$(
            @ParameterLayout(named="input") String input, 
            @ParameterLayout(named="do it anyway") boolean doItAnyway) {

        // some action here
        return holder;
    }
    
    public String validate$$(String input, boolean doItAnyway) {
        if(doItAnyway) {
            return null;
        }
        return "not good, here's my advice to you ...";
    }
}

Cheers, Andi

On 2018/11/23 15:46:26, Sander Ginn <sa...@ginn.it> wrote: 
> Hi,
> 
> We’ve had a number of support requests relating to new users of our application that are not yet fully familiar with their business process. 
> We do not wish to invalidate input as many business rules are not clearly defined in a ‘correct/incorrect’ fashion, with many exceptions and special cases.
> 
> As a middle ground, I would like to propose an extension of the metamodel with a support method similar to validateXxx(), which renders the familiar dialog and warning message underneath the input field with another colour (yellow, probably) but does not block the user from completing the action.
> 
> Does anyone else consider this to be a useful addition, and if so, what would be a good method prefix? My first thought was warnXxx(), but that does not make a lot of sense syntactically; after all, we aren’t warning the action in question (as opposed to validate/hide/disableXxx()) but the user instead.
> 
> Best
> Sander Ginn

AW: Warning a user based on input on action invocation

Posted by "Rade, Joerg / Kuehne + Nagel / HAM GI-DP" <Jo...@Kuehne-Nagel.com>.
Good point!

highlight/notify/raise/alertXxx ?

-j
-----Ursprüngliche Nachricht-----
Von: Sander Ginn [mailto:sander@ginn.it]
Gesendet: Freitag, 23. November 2018 16:46
An: users@isis.apache.org
Betreff: Warning a user based on input on action invocation

Hi,

We’ve had a number of support requests relating to new users of our application that are not yet fully familiar with their business process.
We do not wish to invalidate input as many business rules are not clearly defined in a ‘correct/incorrect’ fashion, with many exceptions and special cases.

As a middle ground, I would like to propose an extension of the metamodel with a support method similar to validateXxx(), which renders the familiar dialog and warning message underneath the input field with another colour (yellow, probably) but does not block the user from completing the action.

Does anyone else consider this to be a useful addition, and if so, what would be a good method prefix? My first thought was warnXxx(), but that does not make a lot of sense syntactically; after all, we aren’t warning the action in question (as opposed to validate/hide/disableXxx()) but the user instead.

Best
Sander Ginn

Kühne + Nagel (AG & Co.) KG
Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE 812773878.
Geschäftsleitung Kühne + Nagel (AG & Co.) KG: Dr. Hansjörg Rodi (Vors. ), Tom Ban, Martin Brinkmann, Holger Ketz, Jan-Hendrik Köstergarten, Nicholas Minde, Lars Wedel, Matthias Weiner.
Persönlich haftende Gesellschafterin: Kühne & Nagel A.G., Rechtsform: Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745, Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
Geschäftsleitung Region Zentral- und Osteuropa: Dr. Hansjörg Rodi (Vors.), Tom Ban, Dominic Edmonds, Thierry Held, Uwe Hött, Richard Huhn, Holger Ketz, Jan-Hendrik Köstergarten, Jan Kunze.

Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen Spediteurbedingungen 2017 (ADSp 2017). Hinweis: Die ADSp 2017 weichen in Ziffer 23 hinsichtlich des Haftungshöchstbetrages für Güterschäden (§ 431 HGB) vom Gesetz ab, indem sie die Haftung bei multimodalen Transporten unter Einschluss einer Seebeförderung und bei unbekanntem Schadenort auf 2 SZR/kg und im Übrigen die Regelhaftung von 8,33 SZR/kg zusätzlich auf 1,25 Millionen Euro je Schadenfall sowie 2,5 Millionen Euro je Schadenereignis, mindestens aber 2 SZR/kg, beschränken. Die ADSp sind auf unserer Webseite als Download erhältlich. Auf Anfrage senden wir Ihnen diese auch gerne zu.