On Thu, Jan 20, 2011 at 2:42 AM, rolandpeng <rolandp...@cht.com.tw> wrote:

>
> Hi,
>   After doing insert or update,I'd like to show some alert message,such as
> "insert succeed. or update succeed.",and then do setResponsePage() to data
> listing page.
>   But I wonder how to do it under wicket. Would anyone give me some hint?
> Thank you!
>
> use case: insert or update-->alert message-->auto redirect to data listing
> page.
>
> Roland.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-do-setResponsePage-after-alert-message-pressed-ok-tp3225482p3225482.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
An alert is client side.  A setResponsePage is server side.  So, you can:

1 - create a response that is JS - it alerts, then does a client side
redirect
2 - not use an alert (which is generally a bad UI decision), and instead use
a feedback panel to show the message on the next page.  As a tip, you can
add a feedback panel to the top of your base page so that it automatically
is present in all pages.  then use getSession().info("Your foo was
completed") and call setResponsePage(YourNextPageClass.class) and it will
appear in the FBP

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to