Well, the user is entering a part number (SKU) and there are times where
we’ve specified replacement SKUs.  If I find only 1, then I want to replace
and continue, but if I don’t, I want to continue the existing validation
and maybe it finds a valid part or maybe it gives the user a message.   But
if I replace the 1 and it’s now in a discontinued state, I need to fail
validation and let the user know.  It’s not a typical e-commerce app,
actually it’s a large CRM system, so there are times where I have to do
unusual things to meet the users needs.

The current application (desktop) leaves SKUA in the textfield, but gives
you the validation messages for SKUB (assuming it fails).  I felt that this
was more confusing that swapping the input and then showing the user the
replaced value along with the validation message that belongs to the new
SKU (B)

-Lon

On Tue, Jul 26, 2016 at 8:07 AM, Martin Grigorov <[email protected]>
wrote:

> Hi,
>
> I find it confusing that the user enters "A" and if the validation fails
> (s)he sees "B".
> Me, as a user, I'd ask myself: I've entered "A", why it tells me that "B"
> is incorrect?!
>
> Maybe a better way is to use better error feedback messages than replacing
> the user input ?!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Jul 26, 2016 at 5:00 PM, Lon Varscsak <[email protected]>
> wrote:
>
> > Okay, that works.  Do you think my approach to use a converter is
> > appropriate or should I do it in another place (like validation)?
> >
> > Thanks for your input,
> >
> > Lon
> >
> > On Mon, Jul 25, 2016 at 9:46 PM, Martin Makundi <
> > [email protected]> wrote:
> >
> > > We have made an utility method that uses reflection to set rawinput,
> and
> > > have found this very useful.
> > >
> > > You set both rawInput and rawInputArray
> > >
> > > **
> > > Martin
> > >
> > > 2016-07-26 1:18 GMT+03:00 Lon Varscsak <[email protected]>:
> > >
> > > > Okay, so I have a need…I’m sure I’m going to get “why are you doing
> > > that?”,
> > > > but I have this need regardless and here’s what it is… :D
> > > >
> > > > User inputs “VALUEA”, I want to look up something in the database for
> > > > “VALUEA”, and if conditions are met, replace that with “VALUEB” and
> > > > continue with validation for the new value.  However, the only way I
> > can
> > > > see to do this would be to update the *rawInput* value, which I do
> not
> > > have
> > > > access to as a subclass (it’s private).
> > > >
> > > > So instead, I tried writing a converter, and it generally behaves as
> I
> > > want
> > > > (it validates “VALUEB”), however if there’s a validation error on
> > > “VALUEB”
> > > > the rawInput is still “VALUEA”…so it’s a little confusing to the
> user.
> > > >
> > > > I’m not sure that using a converter is the “right” approach, but it’s
> > the
> > > > closest I’ve come to a solution.
> > > >
> > > > Thoughts?
> > > >
> > > > Thanks,
> > > >
> > > > Lon
> > > >
> > >
> >
>

Reply via email to