I have a situation where I have a sign-in/sign-out link in my YUI
menu2. If the link is just somewhere on the page, it seems to behave
okay. When the user clicks the link, they go to the login screen.
Upon successful login, they go right back to where they came from.
However, if I put the links into the menu via:
menuBar.addMenu(new AbstractYuiMenuAction(new Model<String>("Sign In"))
{
public void onClick()
{
redirectToInterceptPage(new SignInPage());
}
});
then when the user logs in successfully, they just sit there at the
SignInPage. Here's my code for doing the sign-in with just a regular
link (which works):
final Link signInLink = new Link("signInLink")
{
public void onClick()
{
redirectToInterceptPage(new SignInPage());
}
public boolean isVisible()
{
return !((MyWebSession) getSession()).isSignedIn();
}
};
add(signInLink);