a month ago - last edited a month ago
Hello, I'm currently doing a UI5 course and I've encountered a problem with sap.uxap library in this chapter . I used code provided in the course and I'm trying to use sap.uxap elements in Detail.view.xml
<mvc:View controllerName="student02.com.sap.training.ux402.listdetail.ux402listdetail.controller.Detail"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:ux="sap.uxap"
xmlns:layout="sap.ui.layout">
<ux:ObjectPageLayout id="objectPageLayout">
<ux:headerTitle>
<ux:ObjectPageDynamicHeaderTitle id="objectPageDynamicHeader">
<ux:expandedHeading>
<Title
id="title1"
text="{Carrname}"
level="H2"/>
</ux:expandedHeading>
</ux:ObjectPageDynamicHeaderTitle>
</ux:headerTitle>
<ux:headerContent>
<FlexBox wrap="Wrap" id="flexBox">
<Avatar id="avatar" src="sap-icon://flight"/>
<layout:VerticalLayout id="verticalLayout1" class="sapUiSmallMarginBeginEnd">
<Label id="label1" text="{Carrid}"/>
<Label id="label2" text="{Url}"/>
</layout:VerticalLayout>
</FlexBox>
</ux:headerContent>
<ux:sections>
<ux:ObjectPageSection id="objectPageSection">
<ux:ObjectPageSubSection id="objectPageSubSection1">
<Table id="table" headerText="{i18n>tableHeaderText}" items="{to_Connection}"
noDataText="{i18n>tableNoDataText}">
<columns>
<Column id="column1">
<Text id="text1" text="{i18n>idColumnText}"/>
</Column>
<Column id="column2">
<Text id="text2" text="{i18n>cityFromColumnText}"/>
</Column>
<Column id="column3">
<Text id="text3" text="{i18n>cityToColumnText}"/>
</Column>
</columns>
<items>
<ColumnListItem id="columnListItem">
<cells>
<Text id="text4" text="{Carrid}"/>
<Text id="text5" text="{Cityfrom}"/>
<Text id="text6" text="{Cityto}"/>
</cells>
</ColumnListItem>
</items>
</Table>
</ux:ObjectPageSubSection>
</ux:ObjectPageSection>
</ux:sections>
</ux:ObjectPageLayout>
</mvc:View>
Then, when I click on the button that routes to this view I get an error in the browser
I also tried to access resources link from which ObjectPageLayout.js should be accessed and there is nothing in the uxap repository ( https://port8080-workspaces-ws-clgqm.us10.trial.applicationstudio.cloud.sap/resources/sap )
Does this mean that the error is on the side of API and not in my project?
Thanks in advance for responses.
Michal
Request clarification before answering.
Hi @mmitro i was getting the same error as you.
Try adding the dependency for the sap.uxap library in the following files:
in the ui5.yaml
In the manifest.json
It worked for me !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
56 | |
10 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.