This is how it's supposed to work. ClearInput will only clear the user
input, not the model.
I think it will all become clear once you have written you first form that
updates an existing modelobject with validation on the new inputvalues, but
that's clearly not required for your use case here.


2010/1/14 Steve Swinsburg <[email protected]>

> Hello all,
>
> I have a list of items and an ajax form at the bottom so you can add items
> to the list, containing a single textfield and a submit button. On
> successful submit, the item is saved and the list is redrawn. Great!
> I want to clear the textfield though so new items can be added, since the
> textfield and form stays on page at all times.
>
> I tried:
>
> textField.clearInput();
> target.addComponent(textField);
>
> and
>
> form.clearInput();
> target.addComponent(form);
>
> and a few combinations of the above (!) but to no avail. Are these methods
> meant to clear the raw input from either the FormComponent or the Form
> itself? I would have thought so. The only way I could get it cleared was:
>
> textField.setModelObject(null);
>
> Is this how its meant to be or a bug? Just double checking.
>
> cheers,
> Steve
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to