> <html> > <body> > <div wicket:id="loggedin"><span wicket:id="username"></div> > <div wicket:id="loggedout"><form > wicket:id="form">...</form></div> > ... > > MyPage() { > add(new WebMarkupContainer("loggedin", new > PropertyModel(this,"session.user.username")) { > public boolean isvisible() { return > ((MySession)getSession()).getUser()!=null; } > } > > WebMarkupContainer loggedout=new WebMarkupContainer("loggedout") { > public boolean isvisible() { return > ((MySession)getSession()).getUser()==null; } > } > add(loggedout); > loggedout.add(new Form("form")....
That's the first option. The advantage is that it is generally easier to see what you have on your page. The other option - like shown in the templates example - is a bit cheaper memory wise, as you only add what you need. Eelco ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user