A tiny framework for creating web apps in Ceylon

Flash attributes

Flash attributes are special values, stored in the session, that are automatically removed once you access them. They are one-time messages that can for example survive a redirect:

shared void logout(Flash flash) {
    flash.add("message", "You have been logged out");

You can then access a flash object from a template:

    {% if flash.peek("message") != null %}
        <div class="info">{{ flash.get("message") }}</div>
    {% endif %}

As soon as a value is retrieved from a flash object (using get()), it is removed from this object.

Next: helpers.