[MGNLRESTCL-47] Asynchronous REST calls from templates Created: 14/Feb/19 Updated: 24/Oct/19 |
|
| Status: | Open |
| Project: | REST Client |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Release notes required: |
Yes
|
| Documentation update required: |
Yes
|
| Epic Link: | Easy Outbound REST |
| Sprint: | Phase 2 |
| Description |
For Example: Some content is of secondary importance such as offers and promotions. Even if the external system where you are getting the promos is slow to respond, you still want to render the primary content of your site immediately. The promos can show a loading indicator and then load later. Acceptance Criteria:
NOTE: This does not require a change to the rendering pipeline. Could maybe be resolved by documentation and examples. Possible approach: Component renders a loading indicator and includes javascript to make an ajax request to another variant of itself using Direct Component Rendering and a different file extension. When this variant of the component is requested (via this file extension), it then makes the normal synchronous restfn call and renders itself (either as JSON or HTML depending on the usecase). When this rendering is returned to the JS that made the AJAX request, either the JS creates some markup based on the returned JSON, or the pre-rendered HTML is injected in the DOM. |
| Comments |
| Comment by Christopher Zimmermann [ 24/Oct/19 ] |
|
Here is a proposal for a technique which could be included in documentation: |