On Fri, 02 Nov 2007, Chris Colman wrote:
>       private String captchaInput = new String("fred");

private String captchaInput = "fred";

>       public final void onError()
>       {
>               super.onError();
>                       
>               // update model fields so the user doesn't have to 
>               // type them in again
>               updateFormComponentModels();
>               refreshCapture();
>       }

This is suspicious.

If I understand correctly, Wicket manipulates form component
input via three diffferent phases:

  1) raw input: directly from the HTTP request
  2) converted input: raw input converted to objects
  3) model: converted input set to models of FormComponents

onError might get called before raw input could be converted,
for example when entering text to an HTML field bound to a 
numeric java field. And if you then update the model values
from (empty) converted input, the HTML input fields might 
display the new, empty values instead of the preserved 
raw input.

I might be wrong as welll and suggest you to dig in the source
code and/or debug to see what really happens.

Best wishes,
Timo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to