When a screen has multiple interacting Ajax controls and you want to control the visibility of components to react to these controls (so that you only display what makes sen
When I'm creating components for a page I tend to add them to component arrays:
Component[] pageComponents = {
new TextField("Field1"),
new TextField("Field2"),
new TextField("Field3")
}
As of Wicket 1.5 the add functions take array parameters [1]. Therefore elements can be added to the page or target like this:
add(pageComponents);
target.add(pageComponents);
Components can then be grouped based on which you want to refresh together.
[1] http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/org/apache/wicket/ajax/AjaxRequestTarget.html