On 2010-08-09 05:32, Igor Vaynberg wrote:
  final Customer customer = item.getModelObject();
...               Link link = new Link("link") {
                    public void onClick()                       {
                        setResponsePage(new CustomerPage(customer));

the line above holds on to the customer object, so the Link subclass
has a reference to customer. instead
...               Link link = new Link("link", item.getmodel()) {
                    public void onClick()                       {

                        setResponsePage(new
CustomerPage((Customer)getmodelobject()));

shouldn't it actually be :

Link link = new Link( "link, item.getModel() ) {
  public void onClick() {
      setResponsePage( new CustomerPage( getModel() ) );
  }
}

?

--
Leszek Gawron                         http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to