You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by auron <ji...@gmail.com> on 2007/10/26 20:45:06 UTC

how do I add a feedback message to another page?

Hi all, 

I have a LoginPage class that basically handles login through acegi. When a
user is logged in, I have  LoginPanel that shows some information about the
user, an "Edit Profile" link and a "Logout" link. 

When the user clicks on logout, I have the following blocK:

add(new Label("logoutDisplay", "Login"))
    .add(new Link("logoutLink") {
        @Override
	public void onClick() {
	    ACPSession session = (ACPSession)getPage().getSession();
	    session.signOut();
	}
});


Inside of the onClick override I sign them out, and I also want to redirect
them to the LoginPage but with a message that says "You have been signed
out." On my LoginPage I have a FeedbackPanel that is used for various
messages (Cannot authenticate, username required, etc). How can I leverage
the FeedbackPanel to add a message to it before it renders the page? 

Thank you very much for any insight, if anything is confusing please let me
know, 

Jin


-- 
View this message in context: http://www.nabble.com/how-do-I-add-a-feedback-message-to-another-page--tf4699120.html#a13433157
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how do I add a feedback message to another page?

Posted by Eelco Hillenius <ee...@gmail.com>.
> I have a LoginPage class that basically handles login through acegi. When a
> user is logged in, I have  LoginPanel that shows some information about the
> user, an "Edit Profile" link and a "Logout" link.
>
> When the user clicks on logout, I have the following blocK:
>
> add(new Label("logoutDisplay", "Login"))
>     .add(new Link("logoutLink") {
>         @Override
>         public void onClick() {
>             ACPSession session = (ACPSession)getPage().getSession();
>             session.signOut();
>         }
> });
>
>
> Inside of the onClick override I sign them out, and I also want to redirect
> them to the LoginPage but with a message that says "You have been signed
> out." On my LoginPage I have a FeedbackPanel that is used for various
> messages (Cannot authenticate, username required, etc). How can I leverage
> the FeedbackPanel to add a message to it before it renders the page?

Since you have no session anymore to connect between those two pages,
you should pass some info to that login page, like a parameter. Or
make an extension of your login page that shows the message you want
and redirect to that.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how do I add a feedback message to another page?

Posted by Martijn Dashorst <ma...@gmail.com>.
Component#info()

Martijn

On 10/26/07, auron <ji...@gmail.com> wrote:
>
> Hi all,
>
> I have a LoginPage class that basically handles login through acegi. When a
> user is logged in, I have  LoginPanel that shows some information about the
> user, an "Edit Profile" link and a "Logout" link.
>
> When the user clicks on logout, I have the following blocK:
>
> add(new Label("logoutDisplay", "Login"))
>     .add(new Link("logoutLink") {
>         @Override
>         public void onClick() {
>             ACPSession session = (ACPSession)getPage().getSession();
>             session.signOut();
>         }
> });
>
>
> Inside of the onClick override I sign them out, and I also want to redirect
> them to the LoginPage but with a message that says "You have been signed
> out." On my LoginPage I have a FeedbackPanel that is used for various
> messages (Cannot authenticate, username required, etc). How can I leverage
> the FeedbackPanel to add a message to it before it renders the page?
>
> Thank you very much for any insight, if anything is confusing please let me
> know,
>
> Jin
>
>
> --
> View this message in context: http://www.nabble.com/how-do-I-add-a-feedback-message-to-another-page--tf4699120.html#a13433157
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org