
1. SmartField which is bound to Price field is rendered as usual:
2. The mock data, Products.json, will be loaded by Mock server and once it is available, success callback is triggered.
3. In callback, setElementBindingContext will trigger initialization logic of SmartField:
4. Here ODataControlFactory will try to get all sap defined annotation from OData Metadata,
The picture above highlights some of sap annotations. For a complete list of them, please refer to this link.
Parse logic of all annotations could be find from AnnotationHelper.get<Annotation name>. The example below introduces how sap:unit annotation is parsed.
The string "CurrencyCode" is returned:
At this time, metadata for currency UI element is available and it is ready for creation:
5. UI element for currency code display is created here:
And CSS class sapUiCompSmartFieldUnit is added:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
10 | |
8 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 |