[jira] [Commented] (TAP5-1949) Alerts component does not show alerts added from a component that occurs later in the template
[ https://issues.apache.org/jira/browse/TAP5-1949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13422920#comment-13422920 ] Jochen Kemnade commented on TAP5-1949: -- If I am not mistaken, I've already done that, at least the attachment management says so. Alerts component does not show alerts added from a component that occurs later in the template -- Key: TAP5-1949 URL: https://issues.apache.org/jira/browse/TAP5-1949 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.3.3, 5.3.4, 5.4 Reporter: Jochen Kemnade Assignee: Massimo Lusetti Priority: Minor Labels: patch Attachments: 0001-defer-the-alerts-JS-initialization-to-allow-for-aler.patch Consider the following snippet: t:alerts / t:componentthataddsanalert / The alert will not be shown as the JS for the alerts is generated in the beginRender phase of the alerts component. and alerts that are added later are ignored until its next rendering. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[1/2] git commit: [TAP5-1949] Defer alerts initialization to catch them all
Updated Branches: refs/heads/5.3 3aa74a333 - da6ce37bb refs/heads/master fd1874490 - ec216f2a0 [TAP5-1949] Defer alerts initialization to catch them all Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/da6ce37b Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/da6ce37b Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/da6ce37b Branch: refs/heads/5.3 Commit: da6ce37bb5fbdd2472d0b011a22a05e362ca8986 Parents: 3aa74a3 Author: Massimo Lusetti mluse...@apache.org Authored: Thu Jul 26 15:47:19 2012 +0200 Committer: Massimo Lusetti mluse...@apache.org Committed: Thu Jul 26 15:50:04 2012 +0200 -- .../tapestry5/corelib/components/Alerts.java | 18 +--- .../tapestry5/integration/app1/AlertsTests.groovy |9 .../app1/components/ErrorComponent.java| 35 +++ .../integration/app1/pages/AlertsDemo.java | 11 + .../integration/app1/pages/AlertsDemo.tml | 11 - 5 files changed, 77 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da6ce37b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java index c3b4c40..a8728a3 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java @@ -77,12 +77,7 @@ public class Alerts implements ClientElement if (storage != null) { -for (Alert alert : storage.getAlerts()) -{ -javaScriptSupport.addInitializerCall(addAlert, alert.toJSON()); -} - -storage.dismissNonPersistent(); +addAlertsFromStorage(); } @@ -106,4 +101,15 @@ public class Alerts implements ClientElement return new JSONObject(); } + +@HeartbeatDeferred +void addAlertsFromStorage() +{ +for (Alert alert : storage.getAlerts()) +{ +javaScriptSupport.addInitializerCall(addAlert, alert.toJSON()); +} + +storage.dismissNonPersistent(); +} } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da6ce37b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy index 4936cee..60b8e19 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy @@ -116,4 +116,13 @@ class AlertsTests extends SeleniumTestCase assertTrue isElementPresent(//div[@class='alert-class']) } +/** TAP5-1949 - alerts initialization should be deferred to include every component's alerts */ +@Test +void make_sure_alerts_are_added_last() +{ +openLinks 'Alerts Demo', 'reset', 'show error component' + +assertTextPresent ('Error from ErrorComponent') +} + } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da6ce37b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java new file mode 100644 index 000..01a2b0a --- /dev/null +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java @@ -0,0 +1,35 @@ +// Copyright 2006, 2007 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.apache.tapestry5.integration.app1.components; + +import
[2/2] git commit: [TAP5-1949] Defer alerts initialization to catch them all
[TAP5-1949] Defer alerts initialization to catch them all Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ec216f2a Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ec216f2a Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ec216f2a Branch: refs/heads/master Commit: ec216f2a0e6684fc7c747603894e218bd6ec514d Parents: fd18744 Author: Massimo Lusetti mluse...@apache.org Authored: Thu Jul 26 15:47:19 2012 +0200 Committer: Massimo Lusetti mluse...@apache.org Committed: Thu Jul 26 15:47:19 2012 +0200 -- .../tapestry5/corelib/components/Alerts.java | 18 +--- .../tapestry5/integration/app1/AlertsTests.groovy |9 .../app1/components/ErrorComponent.java| 35 +++ .../integration/app1/pages/AlertsDemo.java | 11 + .../integration/app1/pages/AlertsDemo.tml | 11 - 5 files changed, 77 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ec216f2a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java index bc13695..af201ec 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java @@ -75,12 +75,7 @@ public class Alerts implements ClientElement if (storage != null) { -for (Alert alert : storage.getAlerts()) -{ -javaScriptSupport.addInitializerCall(addAlert, alert.toJSON()); -} - -storage.dismissNonPersistent(); +addAlertsFromStorage(); } @@ -104,4 +99,15 @@ public class Alerts implements ClientElement return new JSONObject(); } + +@HeartbeatDeferred +void addAlertsFromStorage() +{ +for (Alert alert : storage.getAlerts()) +{ +javaScriptSupport.addInitializerCall(addAlert, alert.toJSON()); +} + +storage.dismissNonPersistent(); +} } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ec216f2a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy index 4936cee..60b8e19 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy @@ -116,4 +116,13 @@ class AlertsTests extends SeleniumTestCase assertTrue isElementPresent(//div[@class='alert-class']) } +/** TAP5-1949 - alerts initialization should be deferred to include every component's alerts */ +@Test +void make_sure_alerts_are_added_last() +{ +openLinks 'Alerts Demo', 'reset', 'show error component' + +assertTextPresent ('Error from ErrorComponent') +} + } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ec216f2a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java new file mode 100644 index 000..01a2b0a --- /dev/null +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java @@ -0,0 +1,35 @@ +// Copyright 2006, 2007 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.apache.tapestry5.integration.app1.components; + +import org.apache.tapestry5.alerts.AlertManager; +import org.apache.tapestry5.alerts.Duration; +import
[jira] [Resolved] (TAP5-1949) Alerts component does not show alerts added from a component that occurs later in the template
[ https://issues.apache.org/jira/browse/TAP5-1949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Massimo Lusetti resolved TAP5-1949. --- Resolution: Fixed Fix Version/s: 5.4 5.3.5 Thanks for the patch Joachen Kemnade Alerts component does not show alerts added from a component that occurs later in the template -- Key: TAP5-1949 URL: https://issues.apache.org/jira/browse/TAP5-1949 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.3.3, 5.3.4, 5.4 Reporter: Jochen Kemnade Assignee: Massimo Lusetti Priority: Minor Labels: patch Fix For: 5.3.5, 5.4 Attachments: 0001-defer-the-alerts-JS-initialization-to-allow-for-aler.patch Consider the following snippet: t:alerts / t:componentthataddsanalert / The alert will not be shown as the JS for the alerts is generated in the beginRender phase of the alerts component. and alerts that are added later are ignored until its next rendering. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[2/3] git commit: update copyrights
update copyrights Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/30484dd2 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/30484dd2 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/30484dd2 Branch: refs/heads/5.3 Commit: 30484dd24eb4f0c829ca705e26acffbddcf4dce9 Parents: 285efb8 Author: Massimo Lusetti mluse...@apache.org Authored: Thu Jul 26 16:02:21 2012 +0200 Committer: Massimo Lusetti mluse...@apache.org Committed: Thu Jul 26 16:02:34 2012 +0200 -- .../tapestry5/integration/app1/AlertsTests.groovy |2 +- .../app1/components/ErrorComponent.java|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/30484dd2/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy -- diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy index 60b8e19..3fa1580 100644 --- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy +++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy @@ -1,4 +1,4 @@ -// Copyright 2011 The Apache Software Foundation +// Copyright 2011, 2012 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/30484dd2/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java -- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java index 01a2b0a..5dc3889 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/ErrorComponent.java @@ -1,4 +1,4 @@ -// Copyright 2006, 2007 The Apache Software Foundation +// Copyright 2012 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License.
[1/3] git commit: update copyrights
Updated Branches: refs/heads/5.3 285efb8f9 - 769033e80 refs/heads/master ec216f2a0 - 6223ac85a update copyrights Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/769033e8 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/769033e8 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/769033e8 Branch: refs/heads/5.3 Commit: 769033e8049241c20953753b518cec4a35dbf9bd Parents: 30484dd Author: Massimo Lusetti mluse...@apache.org Authored: Thu Jul 26 16:03:06 2012 +0200 Committer: Massimo Lusetti mluse...@apache.org Committed: Thu Jul 26 16:03:06 2012 +0200 -- .../tapestry5/corelib/components/Alerts.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/769033e8/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java -- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java index a8728a3..c82e02d 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java @@ -1,4 +1,4 @@ -// Copyright 2011 The Apache Software Foundation +// Copyright 2011, 2012 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License.
[jira] [Created] (TAP5-1980) Support for dismissing a single alert
Matías Blasi created TAP5-1980: -- Summary: Support for dismissing a single alert Key: TAP5-1980 URL: https://issues.apache.org/jira/browse/TAP5-1980 Project: Tapestry 5 Issue Type: Improvement Affects Versions: 5.3.4 Reporter: Matías Blasi Priority: Minor It would be usefull to dismiss a single alert. Up to know there is no event triggered to the server if a single alert is dismissed. I have extended the AlertStorage, so I need to know when a single alert is dismissed in order to reflect that into my storage. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1980) Support for dismissing a single alert
[ https://issues.apache.org/jira/browse/TAP5-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matías Blasi updated TAP5-1980: --- Component/s: tapestry-core Support for dismissing a single alert - Key: TAP5-1980 URL: https://issues.apache.org/jira/browse/TAP5-1980 Project: Tapestry 5 Issue Type: Improvement Components: tapestry-core Affects Versions: 5.3.4 Reporter: Matías Blasi Priority: Minor Labels: alert, dismiss It would be usefull to dismiss a single alert. Up to know there is no event triggered to the server if a single alert is dismissed. I have extended the AlertStorage, so I need to know when a single alert is dismissed in order to reflect that into my storage. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira