I have a TextField with “timePicker” as CSS class. Wicket change this input in a TimePicker (to select hour and minute).
This input is inside a WebMarkupContaner. After a specific Ajax event, the entire container is Targeted
target.add(container);
and so the input inside it. Unfortunally, the input lost the timePicker utility becoming a simple textfield.
I have tried, with Browser Javascript debug, to launch:
$("#inputId").timePicker();
and the input return to be a TimePicker. I deduce that Wicket attach the behavior only at the first page rendering.
How can I add the .timePicker() behavior after Ajax target?
Thanks
You may try two things:
1) Add your JavaScript code to HTML markup of the container within <script /> tag:
2) Append JavaScript to AJAX call for rendering the entire container: