-
Jul 22nd, 2011, 05:42 PM
#1
Please help with understanding spring-js, AJAX, and WebFlow
I've been searching and reading what I can find, but I still can't wrap my head around using AJAX with WebFlow. Any pointers appreciated.
Here's my specific immediate scenario:
On one of the view-states in our flow, there's a "receipt" type page which displays confirmation information, has a button for continuing to a user survey, and has a small form which accepts an email address to receive a copy of the confirmation. (Yes, this could have been done with separate pages, but this is the design our customer wanted.)
That input form has 2 email fields which require some basic validation. If validation succeeds, action code is called to send the email, and the user should see the same receipt page/view-state.
We're currently doing this as a transition (with an evaluate), where the transition returns back to the same view-state. (We also add a success or failure message to flashScope for display).
This works fine but we'd prefer to perform that submission/validation/evaluate as an AJAX call instead.
I *think* I understand the server-side configurations described in 12.5 - at least enough to give things a try - but I'm unclear on how I'd configure the client-side.
I'd prefer not to use Dojo or spring-js if I can help it (for simplicity), but if the effort to not use them is going to be a lot larger, I'd settle for just spring-js first or both if necessary.
Presumably the documentation covers the spring-js/Dojo case, but even there I'm having difficulty piecing it together. I'll go look at a sample app, but I wanted to send out this question in parallel. And, of course, I don't expect the samples to help with the non-spring-js/non-Dojo case.
If anyone can clarify any part of this or point me to useful examples or resources, I'd be grateful.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules