Take the 2-minute tour ×

I am developing a website as part of my final year project and I want to display a message which confirms that an email has been sent.

I know how to display custom error messages on a form i.e. You cannot go any further until the following errors are fixed : login name not known!

I want to display a message which will say: your email has been sent! after I send an email. I have been told that I should display this message through the flash.

I am unsure on how to do this, any help would be greatly appreciated.

share|improve this question
So you'd like to display a message which is not a form error in Tapestry... okay. But what is the role of Flash in your setup? –  Henning May 11 '10 at 12:42
@Henning: Yes i would like to display a message that says your email has been sent similar to fro e.g. gmail, when your email has been sent. I have never used flash before, I am just wondering what is the best way to display such a message in tapestry? –  shane87 May 11 '10 at 15:52

2 Answers 2

up vote 2 down vote accepted

The simplest thing to do would be to show a conditional message on the page displayed when the message was sent, like:

<span t:type="If" t:test="messageSent">Your message was sent.</span>

Page class snippet:

private boolean messageSent;

public boolean isMessageSent() {
    return this.messageSent;

void onSendMessage() {
    this.messageSent = true;

If you have other places in your code where you'd like to display messages, or if you'd like to do some fancy AJAX, creating a messages component to add to your layout might be an option.

share|improve this answer

Since Tapestry 5.3 you can use the Alerts component.


<t:alerts />

Page class:

private AlertManager alertManager;

void onSendMessage() {
     this.alertManager.success("Your message was sent.");

Jumpstart has an example of it. You can play around with it at http://jumpstart.doublenegative.com.au/jumpstart7/examples/component/alerts

share|improve this answer

Your Answer


