wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lon Varscsak <lon.varsc...@gmail.com>
Subject Approach to changing value in input field before validation
Date Mon, 25 Jul 2016 22:18:09 GMT
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.




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message