Skip to content

Commit 514514f

Browse files
committed
Added Footnotes.
1 parent 0dbcda0 commit 514514f

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
# Adaptive Form Submission Handling in fluent-forms-spring-boot-starter
22

33
The submission handling code looks for one or more beans in the Spring Context that provide the
4-
`AfSubmissionHandler` interface. This interface has two methods `boolean canHandle(String formName)`
4+
`AfSubmissionHandler`[^1] interface. This interface has two methods `boolean canHandle(String formName)`
55
and `SubmitResponse processSubmission(Submission submission)`. Whenever a submission comes in, the
6-
`canHandler` method is called on each `AfSubmissionHandler` bean passing in the Adaptive Forms name.
7-
The first `AfSubmissionHandler` that returns `true` (to indicate it can handle this forms submission)
6+
`canHandler` method is called on each `AfSubmissionHandler` bean passing in the Adaptive Forms name.
7+
The first `AfSubmissionHandler` that returns `true` (to indicate it can handle this forms submission)
88
will have its `processSubmission()` method called.
99

10-
The `processSubmission()` method receives a `Submission` object (which is populated with the submission’s
11-
information such as the form data, form name, http headers and the submission redirect URL). The
12-
`processSubmission()` method returns a `SubmitResponse` interface which contains information that will be
10+
The `processSubmission()` method receives a `Submission`[^2] object (which is populated with the submission�s information such as the form data, form name, http headers and the submission redirect URL). The
11+
`processSubmission()` method returns a `SubmitResponse`[^3] interface which contains information that will be
1312
placed in the response. It can currently be a `Response` object, a `SeeOther` object or a `Redirect`
1413
object (which all implement the `SubmitResponse` interface). A `Response` object is for returning text,
1514
html, json, etc. to the browser. A `SeeOther` will redirect the browser to perform a GET on another URL. A `Redirect` will redirect the browser to perform a POST to another URL.
1615

1716
There are a bunch of static convenience methods in `AfSubmissionHandler` that means that you probably
18-
wont have to create an `AfSubmissionhandler` directly, but can use a convenience method like
17+
wont have to create an `AfSubmissionhandler` directly, but can use a convenience method like
1918
`AfSubmissionHandler. canHandleFormNameEquals(String formName, Function<Submission, SubmitResponse> handlerLogic)`
2019
and others.
2120

2221
There are also static convenience functions in the `SubmitResponse.Response` object that make it easy to
2322
create the most common responses (e.g. `Response json(String json)`).
23+
24+
[^1]: com._4point.aem.fluentforms.spring.AemProxyAfSubmission.AfSubmissionHandler
25+
[^2]: com._4point.aem.fluentforms.spring.AemProxyAfSubmission.AfSubmissionHandler.Submission,
26+
[^3]: com._4point.aem.fluentforms.spring.AemProxyAfSubmission.AfSubmissionHandler.SubmitResponse

0 commit comments

Comments
 (0)