Hello, I am learning Wicket by reading <<Wicket in Action>>. I am using Wicket 1.4.5 and Java 6.
On page 244, the sample code is as follows: private int counter = 0; public MyPage() { super(new CompoundPropertyModel(this)); final Label counterLabel = new Label("counter"); add(counterLabel); counterLabel.setOutputMarkupId(true); add(new AjaxLink("counterLabelLink") @Override public void onClick(AjaxRequestTarget target) { counter++; target.addComponent(counterLabel); } }); } The line has super(new CompoundPropertyModel(this)); gives a compiler error. I replaced it with the following: super(); setDefaultModel(new CompoundPropertyModel(this)); and it works. My question is: 1. Am I doing the right thing? 2. Any better or more elegant way? 3. How much of WIA remains true as far as Wicket 1.4.5 concerned? Thanks! --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org