Wicket : Manually set value of a DateTextField

cocoall :

My problem is, that i want to clear the value of my DatetextField html input whenever my user uncheck a checkbox. I have an AjaxCheckBox and currently just have my condition checking if the value equals false.

@Override
protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
    if(!this.getModelObject()){
       ???
    }
}

Thank you :)

Andrea Del Bene :

just set the modelValue of your DatetextField and updated via ajax:

datetextField.setModelObject​(null);
ajaxRequestTarget.add(datetextField);

Don't forget to set a markup id for the datetextField:

datetextField.setOutputMarkupId​(true);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Apache Wicket DateTextField clear

Set manually a value in inputpicker

How to set default value for Wicket DropDownChoice

How to set value to default choice in Wicket DropDownChoice

Wicket : how to set checked value in CheckBoxMultipleChoice

Manually Set Value for FormBuilder Control

Set value of Dropdown Button manually

DOMException when manually set value for FormBuilder Control

Manually set value object's properties in typescript

how to manually set column value in kendo grid

Angular 5 set select object value manually

How to manually set a value in MultiSelect widget in AppMaker?

Java: How to set a value from javascript to a wicket component textfield

EF Code First - Assign Auto Incremented value if value is not manually set

Angular manually set @Input value is still overwritten with the same value in ngOnChanges

Wicket DropDownChoice selected value

Getting the HttpResponseMessage Content value which is set manually(hard coded in the code)

Angular data-binding - set value of model manually

How to avoid to manually set the initial value of a variable in a recursive function?

Manually set cookie value to disable Anti-forgery Token?

Is there a way to manually set the dy value in Animate.event?

How can I set Primary Key Value manually in Laravel

how to set the environment value manually to integer zero in C

Console.log = null for a value I manually set

Set focus on a component with Apache Wicket?

Wicket: Setting value of DropDownChoice with CompoundPropertyModel

Manually set the legend names

Is there a way to manually set @@ROWCOUNT?

Manually Set UINavigationController Children