Comments (3)
Hi @boghyon,
with the last paragraph in Require Modules in XML View and Fragment, we want to point out that the core:require
on FragmentDefinition
doesn't work when the view where the fragment is used is preprocessed. The preprocess
here means that either preprocessor
is registered to XMLView
or the preprocessors
option is set when creating a XMLView
instance, details can be seen here. The Fragment
is not defined inline in the XMLView
but in a separate location.
What you found here is another case where the core:require
doesn't take any effect when writing the FragmentDefinition
inline within a View
definition. This isn't mentioned in the documentation and should be added there.
In both of the cases where the core:require
doesn't have any effect, the FragmentDefinition
node isn't included in the created XMLView
instance. Therefore the core:require
attribute in the FragmentDefinition
isn't available for its child nodes.
I will rewrite the paragraph regarding core:require
in Fragment
and explicitly state that the core:require
doesn't work on FragmentDefinition
node when:
- The View where a fragment is used is preprocessed
- A fragment is defined inline in a View
Best regards,
Jiawei
from openui5-docs.
Now I get it.
This works:
src: https://jsbin.com/luzekib/edit?js,output
<core:FragmentDefinition xmlns:core="sap.ui.core"
core:require="{
IntegerType: 'sap/ui/model/type/Integer'
}">
<!-- ... -->
</core:FragmentDefinition>
Whereas..
This doesn't:
src: https://jsbin.com/baxetik/edit?js,output
<mvc:View xmlns:mvc="sap.ui.core.mvc">
<core:FragmentDefinition xmlns:core="sap.ui.core"
core:require="{
IntegerType: 'sap/ui/model/type/Integer'
}">
<!-- ... -->
</core:FragmentDefinition>
</mvc:View>
TBH, the mentioned paragraph is a bit confusing since it begins saying that core:require
works on the FragmentDefinition
node, and the next sentences deny it right away.
from openui5-docs.
In progress - waiting for feedback from dev
from openui5-docs.
Related Issues (20)
- Versioning of SAPUI5: updating code snippet HOT 6
- `/sap.ui5/commands/shortcuts` description insufficient HOT 2
- Syntax inconsistencies in "Enabling Responsive Padding"
- "OData-based: Requires manual modifications" not meaningful in OpenUI5 HOT 1
- Assigning function directly to "renderer" should no longer be encouraged HOT 3
- Step 27. of the Walkthrough: Update webapp/localService/metadata.xml file HOT 1
- Dead API Links to ODataListBinding Methods HOT 1
- Link to UI Theme Designer disabled HOT 2
- is reference to SAP Web IDE required? HOT 1
- Walkthrough's "Step 19: Reuse Dialogs" is now missing on https://openui5nightly.hana.ondemand.com HOT 3
- Broken link to `sap.ui.mdc.sample.Field` HOT 2
- Documentation consistency: `sap/ui/VersionInfo` vs. `sap.ui.Device` HOT 1
- No mention of `sap.ui.Global` in the API reference HOT 1
- Missing Deprecation Info for sap.ui.layout.form.GridLayout HOT 2
- sap.m.Tokenizer Calculations based on desity mode incorrect HOT 3
- Rendering of page broken since 1.98.0 HOT 1
- "Dates, Times, Timestamps, and Time Zones": missing sub header for JSONModel ↔ ODataModel HOT 4
- Controller Code for Sample Input Checked does not work
- Step 27: Unit Test with QUnit HOT 2
- Double `#` in the URL on a link on `https://sdk.openui5.org/nightly` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openui5-docs.