The best way is to use a flash variable, that way you can redirect to
another page and still show a message. This supports the post/redirect
pattern.

regards Malcolm Edgar

On Fri, Nov 5, 2010 at 8:11 AM, Yinghai Zhao <[email protected]> wrote:

> Hello,
> I'm new to Click and writing my first Click web app.
> I'm wondering what is the best practice to display an error message on a
> page.
> Currently, I used a bindable String "msg" in may base page class, and a msg
> tag in my template.
> When needed, I just set a value to a "msg" and it get displayed in the
> page.
>
> Then I realize that this is not the best way(actually a silly way) to do
> this, since the message will be passed through multiple response(and
> displayed multiple times).
> Is there a best way to handle this situation? some thing like error()
> method in Wicket or flash in ruby on rails.
>
> Thanks
> Hai
>

Reply via email to