[BLOSSOM-154] Useful Component Inheritance Use Case Created: 03/Dec/13 Updated: 19/Dec/14 Resolved: 19/Dec/14 |
|
| Status: | Closed |
| Project: | Blossom |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | TLN | Assignee: | Tobias Mattsson |
| Resolution: | Workaround exists | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| 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)
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
A very typical use case on many websites that I know is this: I tried a lot to find an elegant out-of-the-box way to implement this, these are the results (only relevant attributes are given below, and when I say "header" it's just an example of course): 1. @Area(type=AreaType.LIST) @Inherits(components=ComponentInheritanceMode.ALL) 2. @Area(type=AreaType.LIST) @Inherits(components=ComponentInheritanceMode.FILTERED) 3. @Area(type=AreaType.SINGLE) And so on (I'm not listing all possible combinations; I'm sure you have an idea). What I think is that case 3. should work as needed for that header use case; it's the natural assumption that when you define SINGLE and you place a header on any child page, that implicitely nothing is inherited and it only uses its own newly defined header. Thanks. |
| Comments |
| Comment by Tobias Mattsson [ 19/Dec/14 ] |
|
The functionality provided out of the box with the annotated API solves many cases but will sometimes not be sufficient to solve specific requirements. In such cases I would recommend iterating the page structure in your page controller building a list of the components to render and passing it on to the view via the model. 1) In this case you'd iterate upwards until there's a page where a header component is present. 2) In this case you'd let the author decide if the header component should effect only the page its on only or also sub pages. 3) This has been solved in |