Cloud
Cloud

Reputation: 468

Wicket invisible field not submitted

I try to clear and hide a Textfield in Wicket, based on the ajax update of an AjaxCheckBox. SetVisible(false) works fine, but I can't empty the contents of that textField, neither by using clearInput() nor by setting the value on the ModelObject

Is there any clean way to submit this emptied value with the form without having to force the value in onSubmit()?

Upvotes: 0

Views: 66

Answers (1)

Rob Audenaerde
Rob Audenaerde

Reputation: 20019

You could clear the TextField-model in the ajax-update of the CheckBox and then add the TextField to the AjaxRequestTarget

Upvotes: 1

Related Questions