You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2016/02/24 15:18:18 UTC

[jira] [Commented] (TAP5-1640) Introduce a way to define a custom duration for alert messages that have Duration.TRANSIENT

    [ https://issues.apache.org/jira/browse/TAP5-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163048#comment-15163048 ] 

Jochen Kemnade commented on TAP5-1640:
--------------------------------------

Since this is still a desired feature: I think the {{Alert#toJSON}} method should be deprecated. In my opinion, the {{t5/core/alert}} module is tied to the {{Alerts}} component rather than to the {{Alert}} class, so it should be responsible of converting an {{Alert}} object into a configuration for the {{alert}} module.
The {{alert}} module could be changed to check if data['transient'] is a number and use that as the timeout instead of the default (5000ms). That way, it would be possible to specify a timeout on a per-alert basis (via the JSON's {{transient}} property) as well as via a component default via a data attribute on the Alerts component. That attribute could be set via a parameter whose default could be set via an application symbol. That would make the timeout very flexible but in a backwards-compatible way.

> Introduce a way to define a custom duration for alert messages that have Duration.TRANSIENT
> -------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1640
>                 URL: https://issues.apache.org/jira/browse/TAP5-1640
>             Project: Tapestry 5
>          Issue Type: Improvement
>    Affects Versions: 5.3, 5.4
>            Reporter: Dusko Jovanovski
>            Assignee: Robert Zeigler
>            Priority: Minor
>
> Introduce a way to define a custom duration for alert messages that have Duration.TRANSIENT.
> The best solution would be to enable setting the duration for each transient message, and to be able to override the currently hardcoded default duration of 15000ms.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)