cancel
Showing results for 
Search instead for 
Did you mean: 

White Page when I run my code in sapui5

mahmood_hammood
Participant
0 Kudos
134

Hello everyone,

when I run this code in this link Dynamic Page Free Style , I become white page and console says (see the picture please). I hope you have answer. Thank you

Mahmood

Accepted Solutions (0)

Answers (2)

Answers (2)

junwu
Active Contributor
0 Kudos

xmlns="sap.m"
xmlns="jquery.sap.global-dbg.js" xmlns="jquery-dbg.js"

you defined default namespace more than once. only one is allowed

mahmood_hammood
Participant
0 Kudos

sorry bur I added xmlns="jquery.sap.global-dbg.js" xmlns="jquery-dbg.js" by myself, when I read the console I thoght I should add them. There were not in the original code but the same mistake. I tried to add one of them, two and delete both..but the same.

junwu
Active Contributor
0 Kudos

you should delete two

xmlns="jquery.sap.global-dbg.js" xmlns="jquery-dbg.js"

mahmood_hammood
Participant
0 Kudos

As I mentioned, I deleted both of them, but nothing new.

junwu
Active Contributor
0 Kudos

check your console if you need help, not just saying not working

junwu
Active Contributor
0 Kudos

it says your xml is not valid,

mahmood_hammood
Participant
0 Kudos

Hallo Jun Wu ,

and what should I do?

junwu
Active Contributor
0 Kudos

make it valid by consulting your ide or google.

mahmood_hammood
Participant
0 Kudos

I tried with thissolution but th same problem invalid XML

junwu
Active Contributor
0 Kudos

post your xml here, if not, how can we help??????

mahmood_hammood
Participant
0 Kudos
<core:FragmentDefinition
	xmlns="sap.m"
	xmlns:core="sap.ui.core"
	xmlns:f="sap.f"
	xmlns:card="sap.f.cards">
	<Popover placement="Bottom" showHeader="false" contentWidth="300px">
			<f:Card width="300px">
				<f:header>
					<card:NumericHeader
						title="Sales Revenue"
						subtitle="Sales revenue in the current quarter"
						unitOfMeasurement="EUR"
						number="2.16"
						scale="M"
						trend="Down"
						state="Error">
						<card:sideIndicators>
							<card:NumericSideIndicator number="4.74" unit="M" title="Target" />
							<card:NumericSideIndicator number="-54.49" unit="%" title="Deviation" />
						</card:sideIndicators>
					</card:NumericHeader>
				</f:header>
			</f:Card>
	</Popover>
</core:FragmentDefinition>
junwu
Active Contributor

dude, your view xml, not your fragment

mahmood_hammood
Participant
0 Kudos
<mvc:View
		controllerName="com.volkswagen.ifdb.cc.sopraempSopra_Employee.controller.DynamicPageFreeStyle"
		xmlns:mvc="sap.ui.core.mvc"
		xmlns="sap.m"
		xmlns:f="sap.f"
		xmlns:layout="sap.ui.layout"
		xmlns="jquery.sap.global-dbg.js"
		xmlns="jquery-dbg.js"
		height="100%">
		<f:DynamicPage id="dynamicPageId" headerExpanded="{/headerExpanded}" toggleHeaderOnTitleClick="{/titleClickable}">
			<!-- DynamicPage Title -->
			<f:title>
				<f:DynamicPageTitle>
					<f:heading>
						<Title text="Header Title"/>
					</f:heading>
					<f:breadcrumbs>
						<Breadcrumbs>
							<Link text="Home" />
							<Link text="Page 1" />
							<Link text="Page 2" />
							<Link text="Page 3" />
							<Link text="Page 4" />
							<Link text="Page 5" />
						</Breadcrumbs>
					</f:breadcrumbs>
					<f:expandedContent>
						<Label text="This is a subheading"/>
					</f:expandedContent>
					<f:snappedContent>
						<Label text="This is a subheading"/>
					</f:snappedContent>
					<f:snappedTitleOnMobile>
						<Title text="This is a subheading"/>
					</f:snappedTitleOnMobile>
					<f:content>
						<OverflowToolbar>
							<GenericTag text="SR"
								status="Error"
								press="onPressOpenPopover"
								design="StatusIconHidden">
								<ObjectNumber number="2"
									unit="M"
									emphasized="false"
									state="Error"/>
							</GenericTag>
						</OverflowToolbar>
					</f:content>
					<f:actions>
						<Button
								text="Edit"
								type="Emphasized"
								press="toggleAreaPriority"/>
						<Button
								text="Delete"
								type="Transparent"/>
						<Button
								text="Copy"
								type="Transparent"/>
						<Button
								text="Toggle Footer"
								type="Transparent"
								press="onToggleFooter"/>
						<Button
								icon="sap-icon://action"
								type="Transparent"/>
						<Button
								text="Button with layoutData"
								type="Transparent"
								press="onPressOpenPopover">
							<layoutData>
								<OverflowToolbarLayoutData priority="AlwaysOverflow" closeOverflowOnInteraction="false" />
							</layoutData>
						</Button>
					</f:actions>
					<f:navigationActions>
						<Button
								icon="sap-icon://full-screen"
								type="Transparent" />
						<Button
								icon="sap-icon://decline"
								type="Transparent" />
					</f:navigationActions>
				</f:DynamicPageTitle>
			</f:title>
			<!-- DynamicPage Header -->
			<f:header>
				<f:DynamicPageHeader pinnable="true">
					<layout:HorizontalLayout allowWrapping="true">
						<layout:VerticalLayout class="sapUiMediumMarginEnd">
							<ObjectAttribute title="Location" text="Warehouse A"/>
							<ObjectAttribute title="Halway" text="23L"/>
							<ObjectAttribute title="Rack" text="34"/>
						</layout:VerticalLayout>

						<layout:VerticalLayout>
							<ObjectAttribute title="Availability"/>
							<ObjectStatus text="In Stock" state="Success" />
						</layout:VerticalLayout>
					</layout:HorizontalLayout>
				</f:DynamicPageHeader>
			</f:header>
			<f:content>
				<Table id="idProductsTable"
						sticky="HeaderToolbar,ColumnHeaders"
						inset="false"
						items="{
							path: '/ProductCollection',
							sorter: {
								path: 'Name'
							}
						}"
					   class="sapFDynamicPageAlignContent"
					   width="auto">
					<headerToolbar>
						<Toolbar>
							<Title text="Products" level="H2"/>
						</Toolbar>
					</headerToolbar>
					<columns>
						<Column
								width="12em">
							<Text text="Product" />
						</Column>
						<Column
								minScreenWidth="Tablet"
								demandPopin="true">
							<Text text="Supplier" />
						</Column>
						<Column
								minScreenWidth="Tablet"
								demandPopin="true"
								hAlign="End">
							<Text text="Dimensions" />
						</Column>
						<Column
								hAlign="End">
							<Text text="Price" />
						</Column>
					</columns>
					<items>
						<ColumnListItem>
							<cells>
								<ObjectIdentifier
										title="{Name}"
										text="{ProductId}"/>
								<Text
										text="{SupplierName}" />
								<Text
										text="{Width} x {Depth} x {Height} {DimUnit}" />
								<ObjectNumber
										number="{
											parts:[{path:'Price'},{path:'CurrencyCode'}],
											type: 'sap.ui.model.type.Currency',
											formatOptions: {showMeasure: false}
										}"
										unit="{CurrencyCode}" />
							</cells>
						</ColumnListItem>
					</items>
				</Table>
			</f:content>
			<!-- DynamicPage Footer -->
			<f:footer>
				<OverflowToolbar>
					<Button icon="sap-icon://message-popup"
							text="{/messagesLength}"
							type="Emphasized"
							press="onMessageButtonPress"
							visible="{= !!${/messagesLength}}"/>
					<ToolbarSpacer/>
					<Button type="Accept" text="Accept"/>
					<Button type="Reject" text="Reject"/>
				</OverflowToolbar>
			</f:footer>
		</f:DynamicPage>
</mvc:View>