Ajax label not updating
The name of the view should be the same as the one used in the The idea here is to reload the partial view on the page when the user selects a different category from the drop down list.
This means putting the markup files and the java files next to one another.
It is possible to alter this behavior, but that is beyond the scope of this example.
They allow you to update only a part of the DOM without having to perform a full page refresh or a postback.
Using this approach, the controller can push a nice object model back to the partial view instead of Json and we can take advantage of Razor and/or scaffolding for data presentation while enhancing the whole user experience.
I also added a label that will be updated by the event raised by the textbox.
If you run this code in your application (download the Quickstart project and copy/paste the code in the homepage for a quick experience).
The page gets fully refreshed with each link click.This example shows you how to use Wicket’s Ajax behaviors and components by building a simple counter that updates through Ajax link clicks.In all the Wicket examples, you have to put all files in the same package directory.This way we can reference the label in the event handler of the link component.