Greetings Hai, On 5/11/2010 08:11, Yinghai Zhao 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).
Not sure I understand what you mean here. Why do you see multiple responses? Click Pages are stateless, so your initial assumption (using @Bindable msg) sounds fine to me? As Malcolm mentioned, Flash messages is a good way to display messages when using Redirects. Kind regards Bob
