In the previous example of Wicket you have learned how to make "Hello World" application in Wicket. In this section of Wicket tutorial we are going to describe you an example to create Ajax auto completer in Wicket.
To create Ajax auto completer wicket application we need three files :
AutoCompleter class extends WebPage. In this example we have created an object of Form and this form further consists of AutoCompleteTextField to create Ajax auto complete text field. Here is the full code of AutoCompleter.java as follows:
AutoCompleterApplication calls AutoCompleter class when it returns AutoCompleter class via getHomePage() method. Here is the example code as follows:
Now in the HTML file the auto completer text field is displayed with the wicket identifier "auto".
To run this example one more thing you need to do is to create entry of AutoCompleteraApplication in XML file web.xml. Following lines of code is to be written in web.xml
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.