That looks about right, I'll tested right away.

On 5/4/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

or just keep a field

class mypage extends webpage {
private panel a;
private panel b;

public mypage() {
  a=new MyLoginPanel(...) {
    protected void onLogout(AjaxRequestTarget target) {
         target.add(b);
         target.add(a);
     }
  }
  b=new MyLogoutPanel(...);

}

-igor


On 5/4/07, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
wrote:

> 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
>
>

-------------------------------------------------------------------------
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


-------------------------------------------------------------------------
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