Tapestry 5
  1. Tapestry 5
  2. TAP5-1421

Create a standard way to track messages to be presented to the user

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      For a client, I've created a GlobalAlerts SSO, along with a GlobalAlertsManager service, an Alerts component, even JavaScript client-side support for adding and clearing alerts. I'd like to generalize this code a bit ... currently Alerts messages are limited to strings (fully renderable would be better).

        Activity

        Hide
        Andreas Andreou added a comment -

        Isn't it best to keep something like this out of the core?

        Show
        Andreas Andreou added a comment - Isn't it best to keep something like this out of the core?
        Hide
        Massimo Lusetti added a comment -

        Does the track span more then a request? Let say something related to a "PeriodicalUpdater" or is strictly related to the request scope?

        Andreas why out of the core?

        Show
        Massimo Lusetti added a comment - Does the track span more then a request? Let say something related to a "PeriodicalUpdater" or is strictly related to the request scope? Andreas why out of the core?
        Hide
        Howard M. Lewis Ship added a comment -

        What I currently have associates a severity (info, warn, error) and a duration (one_shot, or until_confirmed) with each message. Mostly, we use one_shot (i.e., displayed to the user once, then forgotten).

        Part of what I have is a component to display the alerts, along with a link used to clear the alerts in place (an Ajax request that also clears alert data on the server).

        The final piece of the puzzle is support for Ajax updates to send additional messages in the response that are updated in place.

        With what I have, plus some prettier CSS, you have a pretty nice solution. The only downside is that the messages are simply strings ... I want the option to render rich text, possibly by having a Block or Component be the "message".

        Show
        Howard M. Lewis Ship added a comment - What I currently have associates a severity (info, warn, error) and a duration (one_shot, or until_confirmed) with each message. Mostly, we use one_shot (i.e., displayed to the user once, then forgotten). Part of what I have is a component to display the alerts, along with a link used to clear the alerts in place (an Ajax request that also clears alert data on the server). The final piece of the puzzle is support for Ajax updates to send additional messages in the response that are updated in place. With what I have, plus some prettier CSS, you have a pretty nice solution. The only downside is that the messages are simply strings ... I want the option to render rich text, possibly by having a Block or Component be the "message".
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #441 (See https://builds.apache.org/job/tapestry-trunk-freestyle/441/)
        TAP5-1421: Test Ajax updates of the page, including dismiss all
        TAP5-1421: Improve test to dismiss the alert
        TAP5-1421: Remove outdated assertion (because non-persistent Alerts may be stored in AlertStorage until the render request)
        TAP5-1421: Add some features to the AlertsDemo page
        TAP5-1421: Only send an Ajax request to dismiss a single alert when the alert is persistent (has an id)
        TAP5-1421: Fiddle with the order of processing of PartialMarkupRendererFilters so that added alerts show up in the correct order
        TAP5-1421: When adding an Alert in an Ajax request, use AjaxResponseRenderer.addCallback()
        TAP5-1421: Allow Tapestry.ajaxRequest() to be invoked with just a URL (used when the response is not useful)
        TAP5-1421: Adjust the Errors component and CSS to not conflict with the new Alerts component
        TAP5-1421: Add a framework for managing client-side and server-side alerts

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152052
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152051
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152049
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertStorage.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152048
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/AlertsDemo.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152047
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152046
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152045
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152044
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152043
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152042
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavaScriptStack.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/AlertsDemo.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/components/Border.tml
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/cancel.png
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertStorage.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-spi.js
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/error.png
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Severity.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.css
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-ajax.js
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/information.png
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Alert.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/delete.png
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-events.js
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Duration.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-dom.js
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertManager.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #441 (See https://builds.apache.org/job/tapestry-trunk-freestyle/441/ ) TAP5-1421 : Test Ajax updates of the page, including dismiss all TAP5-1421 : Improve test to dismiss the alert TAP5-1421 : Remove outdated assertion (because non-persistent Alerts may be stored in AlertStorage until the render request) TAP5-1421 : Add some features to the AlertsDemo page TAP5-1421 : Only send an Ajax request to dismiss a single alert when the alert is persistent (has an id) TAP5-1421 : Fiddle with the order of processing of PartialMarkupRendererFilters so that added alerts show up in the correct order TAP5-1421 : When adding an Alert in an Ajax request, use AjaxResponseRenderer.addCallback() TAP5-1421 : Allow Tapestry.ajaxRequest() to be invoked with just a URL (used when the response is not useful) TAP5-1421 : Adjust the Errors component and CSS to not conflict with the new Alerts component TAP5-1421 : Add a framework for managing client-side and server-side alerts hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152052 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152051 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152049 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertStorage.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152048 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/AlertsDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152047 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152046 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152045 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152044 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152043 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152042 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavaScriptStack.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/AlertsDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/components/Border.tml /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/cancel.png /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertStorage.java /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-spi.js /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/error.png /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Severity.java /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.css /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-ajax.js /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/information.png /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Alert.java /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk/delete.png /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-events.js /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Duration.java /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-dom.js /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/silk /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertManager.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #444 (See https://builds.apache.org/job/tapestry-trunk-freestyle/444/)
        TAP5-1421: Handle the case where all alerts are dismissed but no AlertStorage object yet exists

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152666
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #444 (See https://builds.apache.org/job/tapestry-trunk-freestyle/444/ ) TAP5-1421 : Handle the case where all alerts are dismissed but no AlertStorage object yet exists hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1152666 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development