Hello, I have two panels, one that is mostly a form for login (user/pass
+button) and the other panel is just a link (onClick==>logou).

Now I changed the button for the login form to an ajax button. Everythig
works fine.

The thing is that I had a code something like this in the logout panel.



@Override
public boolean isVisible(){
   return getMyWicketSession().isUserLoggedIn();
}

this code made every round trip evaluate whether the user was still logged
in and if so then render the appropriate option to logout.

how could I add to the target, the logout panel, do I need to pass it
through the constructor :


private final logoutPanel;
public LoginPanel(String id, LogoutPanel panel){
  logoutPanel = panel;

}

Ajax....onSubmit(target.......{
   target.add(logoutPanel)
}
??

Or could I just set in the constructor of the LogoutPanel
setOutputMarkupId(true) and then call on it from the onSubmit AJAX button?

I am a bit lost on this. Or could I just add a simple JavaScript "
document.getElementById('logoutPanel').style.visibility = "visible";

f(t)
-------------------------------------------------------------------------
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

Reply via email to