You can just add a FeedbackPanel to the Page:
add(new FeedbackPanel("feedback"));
<span wicket:id="feedback"></span>
Then call your info(...), error(...) or whatever method:
info("It Worked!");
I haven't worked with 1.3 yet, so I don't know if anything has changed
there.
On 4/24/07, mraible <[EMAIL PROTECTED]> wrote:
I'm trying to success messages working. In my Detail.java page, I have:
protected void onSaveUser(User user) {
userManager.saveUser(user);
getSession().info("It worked!");
setRedirect(true);
setResponsePage(backPage);
}
First of all, is this the proper way to put messages in flash scope?
On my "backPage", I have the following code, but it never seems to find
anything.
// check for success messages
if (!getSession().getFeedbackMessages().isEmpty()) {
// just display first message for now
add(new Label("success-messages",
String.valueOf(getSession().getFeedbackMessages().iterator().next())));
} else {
add(new Label("success-messages", ""));
}
Thanks,
Matt
--
View this message in context:
http://www.nabble.com/Is-there-a-success-message-example--tf3642922.html#a10173842
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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
--
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com
Eventful - Intelligent Event Management
http://www.eventfulhq.com
-------------------------------------------------------------------------
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