I tried this with a detachable model.  I created two versions of the page,
one uses a detachable model and the other doesn't.  I put a printout  in the
constructor of the page.  The printout appears only the first time the page
is loaded in both cases.  Here is the code.  What am I doing wrong?

// Detachable model
public PersonPage( int id )
{
  PersonDetachableModel model = new PersonDetachableModel( id );

  System.out.println( "** HERE I AM **" );   // This doesn't appear upon
RELOAD OF PAGE.

  add( new Label( "name", model.getObject().getName()  ) );
}

public class PersonDetachableModel extends LoadableDetachableModel<Person>
{
  private int personId;

  public PersonDetachableModel( int id ) 
  {
    personId= id;
  }

  public Person load()
  {
    Person person = db.findPerson( personId );
    return person;
  }
}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Demystifying-page-serialization-tp2533538p2535132.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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

Reply via email to