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 > > > > > >
