On 4/23/07, Matthias Karlsson <[EMAIL PROTECTED]> wrote:
see how each panel overrides isvisible(). since the conditions are opposite
only one panel is visible at any given time.
this is one way of doing conditional visibility. there are other patterns to
use when you have more then two panels to choose from, but if you know you
only ever have two the method below is the simplest.
-igor
add(new UserInfoPanel("userInfo") {
> public boolean isVisible() {
> return getSession().getLoggedUser() != null;
> }
> };
>
> add(new LoginPanel("loginPanel") {
> public boolean isVisible() {
> return getSession().getLoggedUser() == null;
> }
> });
-------------------------------------------------------------------------
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