Repository: tapestry-5 Updated Branches: refs/heads/master 3163c83e6 -> 66eed71d2
TAP5-2194: intruduce constants for the SubmitNotifier events Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/66eed71d Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/66eed71d Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/66eed71d Branch: refs/heads/master Commit: 66eed71d2cb3f5c12bc95e8edf4413c26626804d Parents: 3163c83 Author: Jochen Kemnade <[email protected]> Authored: Fri Sep 18 08:46:02 2015 +0200 Committer: Jochen Kemnade <[email protected]> Committed: Fri Sep 18 08:46:02 2015 +0200 ---------------------------------------------------------------------- .../tapestry5/corelib/components/SubmitNotifier.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/66eed71d/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/SubmitNotifier.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/SubmitNotifier.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/SubmitNotifier.java index 967127f..97d1abb 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/SubmitNotifier.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/SubmitNotifier.java @@ -29,9 +29,13 @@ import org.apache.tapestry5.services.FormSupport; * * @tapestrydoc */ -@Events({ "BeginSubmit", "AfterSubmit" }) +@Events({ SubmitNotifier.BEGIN_SUBMIT_EVENT, SubmitNotifier.AFTER_SUBMIT_EVENT }) public class SubmitNotifier { + + public static final String BEGIN_SUBMIT_EVENT = "BeginSubmit"; + public static final String AFTER_SUBMIT_EVENT = "AfterSubmit"; + private static final class TriggerEvent implements ComponentAction<SubmitNotifier> { private final String eventType; @@ -62,12 +66,12 @@ public class SubmitNotifier void beginRender() { - formSupport.store(this, new TriggerEvent("BeginSubmit")); + formSupport.store(this, new TriggerEvent(BEGIN_SUBMIT_EVENT)); } void afterRender() { - formSupport.store(this, new TriggerEvent("AfterSubmit")); + formSupport.store(this, new TriggerEvent(AFTER_SUBMIT_EVENT)); } private void trigger(String eventType)
