WiA covers 1.3, there's a wiki page that covers the differences here:
http://cwiki.apache.org/WICKET/migrating-to-wicket-14.html
95% of WiA is going to work just fine though, aside from the changes mentioned
in the migration link above
On Feb 4, 2010, at 7:51 PM, David Chang wrote:
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
To our success!
Mystic Coders, LLC | Code Magic | www.mysticcoders.com
ANDREW LOMBARDI | [email protected]
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu
Eco-Tip: Printing e-mails is usually a waste.
========================================================
This message is for the named person's use only. You must not, directly or
indirectly, use,
disclose, distribute, print, or copy any part of this message if you are not
the intended recipient.
========================================================