-
Type:
Story
-
Status: Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: 7.2.10 DXP FP2, 7.2.10.1 DXP SP1, 7.2.X, Master
-
Component/s: Fragment Administration
-
Branch Version/s:7.2.x
-
Backported to Branch:Committed
-
Epic Link:
-
Git Pull Request:
Context
Fragment developers can choose to make their fragments configurable. Currently the configuration can be read using freemarker to produce HTML. However it is sometimes desirable to be able to read the configuration from JavaScript. Furthermore, making the configuration available in JavaScript enables developers who do not know freemarker to develop configurable fragments.
Acceptance Criteria
- Given a fragment with a configuration definition when the JavaScript code is executed then there is a JavaScript configuration object available which contains the current values of the fragment configuration
- Given a fragment without a configuration definition when the JavaScript code is executed then the JavaScript configuration object is available and is empty.
- The name and structure of the JavaScript configuration object must be identical to the one currently available in the freemarker context
Technical notes
A suggested way to make the JavaScript configuration object available is by passing it as a second parameter in the JavaScript function. For example:
function(fragmentElement, configuration) {
// Fragment js code
}
The configuration object would be built in a similar way as follows:
var configuration = {
field1 = value1,
field2 = value2
}
- is related to
-
LPS-101577 LPS-100963 - Product QA | Test Automation Creation
-
- Closed
-
1.
|
Product QA | Test Scenarios/Cases Creation | LPS-101238 |
|
Closed | Manoel Cyreno | |
2.
|
Documentation | LPS-101403 |
|
Closed | Cody Hoag | |
3.
|
Manual Testing | LPS-101443 |
|
Closed | Brooke Dalton |