Skip to Content
0

Page is always scrolling down

Feb 14, 2017 at 09:25 AM

62

avatar image

Hi there,

I have a simple page with problem that it's always scrolled down. Can you help me understand why so I can fix it? Thanks.

index.html

<script>
sap.ui.getCore().attachInit(function() {
				
	var oCompContainer = new sap.ui.core.ComponentContainer({
				height: "100%",
				width: "100%" 
			})
				
	new sap.m.Shell({
		app: oCompContainer,
		showLogout:false
	}).placeAt("content");					


	var oComponent = sap.ui.component({
		name: "ZMH_UNRGSRCH",
		id: "ZMH_UNRGSRCH",
		manifestFirst: true,
		async: true
	}).then(function(oComponent){
	oCompContainer.setComponent(oComponent);
	});
			 	
});
</script>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
	</head>
  <body class="sapUiBody" role="application">
    <div id="content"></div>
  </body>
</html>

detail.view.xml

<mvc:View xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
	controllerName="ZMH_UNRGSRCH.controller.posting" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout">
	<App homeIcon="favicon.ico">
		<pages>
			<Page backgroundDesign="Solid" showFooter="false" showHeader="false" showSubHeader="false">
				<content>
					<Image densityAware="false" id="idHeader" src="img/header/with_logo_EN.jpg" width="100%"/>
					<VBox class="sapUiSmallMargin">
						<l:DynamicSideContent id="DynamicSideContent" sideContentFallDown="BelowM" containerQuery="false" sideContentVisibility="AlwaysShow"
							class="sapUiContentPadding">
							<l:mainContent>
								<Text text="{POSTING>/post_company_desc}" width="auto"/>
								<!--Fragment-->
								<core:Fragment fragmentName="ZMH_UNRGSRCH.view.fragments.posting" type="XML"/>
								<!--Fragment-->
							</l:mainContent>
							<l:sideContent>
								<!--Fragment-->
								<core:Fragment fragmentName="ZMH_UNRGSRCH.view.fragments.postingSide" type="XML"/>
								<!--Fragment-->
							</l:sideContent>
						</l:DynamicSideContent>
						<FlexBox justifyContent="SpaceBetween" wrap="NoWrap">
							<items>
								<l:HorizontalLayout class="sapUiSmallMarginTop sapUiSmallMarginBottom sapUiContentPadding">
									<Text class="sapUiSmallMarginEnd" id="notWithYoutxt" text="{i18n>NOT_WITHOUT_YOU}"/>
									<Text text="{i18n>CAREERS_AT_MH}" id="carAtMHTxt"/>
								</l:HorizontalLayout>
								<Image class="" densityAware="false" id="idLogo" src="img/logo-new.png" width="100%"/>
							</items>
						</FlexBox>
					</VBox>

posting.fragment.xml

<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout" xmlns:mvc="sap.ui.core.mvc" xmlns:u="sap.ui.unified" xmlns="sap.m"
	displayBlock="false" xmlns:f="sap.ui.layout.form">
	<l:HorizontalLayout class="sapUiSmallMarginTop">
		<l:VerticalLayout width="100%">
			<Text class="sapUiSmallMarginTop zmhH1" text="{POSTING>/post_header}"/>
			<Text class="sapUiSmallMarginTop zmhPostH3" text="{i18n>HEADER_TASK_DESCRIPTION}"/>
			<Text class="sapUiSmallMarginTop" id="ptask" text="{POSTING>/post_task_desc}"/>
			<Text class="sapUiSmallMarginTop zmhPostH3" text="{i18n>HEADER_REQUIREMENT_DESCRIPTION}"/>
			<Text class="sapUiSmallMarginTop" id="prequirement" text="{POSTING>/post_requirement_desc}"/>
			<Text class="sapUiSmallMarginTop" text="{POSTING>/post_project_desc}"/>
			
			<Text class="sapUiSmallMarginTop zmhPostH3" id="LABEL_INTEREST_GROUP_01" text="{POSTINGTXT>/LABEL_INTEREST_GROUP}"/>
			<Text class="sapUiSmallMarginTop" id="TEXT_INTEREST_GROUP_01" text="{POSTINGTXT>/TEXT_INTEREST_GROUP01}"/>
			<Text class="sapUiSmallMarginTop" id="TEXT_INTEREST_GROUP_02" text="{POSTINGTXT>/TEXT_INTEREST_GROUP02}"/>
			<Text class="sapUiSmallMarginTop" id="TEXT_INTEREST_GROUP_03" text="{POSTINGTXT>/TEXT_INTEREST_GROUP03}"/>
		</l:VerticalLayout>
	</l:HorizontalLayout>
</core:FragmentDefinition>

postingSide.fragment.xml

<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout" xmlns:mvc="sap.ui.core.mvc" xmlns:u="sap.ui.unified" xmlns="sap.m"
	displayBlock="false" xmlns:f="sap.ui.layout.form">
	<l:VerticalLayout>
		<Text id="applyNowTxt" text="{i18n>APPLY_NOW}"/>
		<Text class="sapUiSmallMarginTop zmhPostH4" text="{i18n>POSTING_LOCATION}"/>
		<Text id="pcity" text="{POSTING>/job_location/city}"/>
		<Text id="pcountry" text="{POSTING>/job_location/city}"/>
		<Link href="{i18n>LINK_CAREERS}" target="_blank" text="{i18n>TEXT_LINK_CAREERS}" wrapping="true" id="careerLink"/>
		<l:HorizontalLayout class="sapUiSmallMarginTop">
			<Button class="sapUiTinyMarginEnd" icon="sap-icon://email" id="idButtonForward" press="onForward" text="{i18n>BUTTON_FORWARD}"></Button>
			<Button icon="sap-icon://forward" id="idButtonApply" press="onApply" text="{i18n>BUTTON_APPLY}"></Button>
		</l:HorizontalLayout>
		<Text class="sapUiMediumMarginTop" text="{i18n>LABEL_VISIT_US}"/>
		<l:HorizontalLayout class="sapUiTinyMarginTop">
			<Image densityAware="false" id="linkBlog" press="openWindow" src="img/logo_blog.png"></Image>
			<Image densityAware="false" id="linkGooglePlus" press="openWindow" src="img/googleplus1.png"></Image>
			<Image densityAware="false" id="linkRSS" press="openWindow" src="img/rss_rework.png"></Image>
			<Image densityAware="false" id="linkYoutube" press="openWindow" src="img/YouTube1.jpg"></Image>
			<Image densityAware="false" id="linkTwitter" press="openWindow" src="img/Twitter1.png"></Image>
			<Image densityAware="false" id="linkLinkedin" press="openWindow" src="img/linkedIn2.jpg"></Image>
			<Image densityAware="false" id="linkXing" press="openWindow" src="img/Xing1.png"></Image>
		</l:HorizontalLayout>
	</l:VerticalLayout>
	<Dialog icon="" id="dialogApply" showHeader="true" state="None" stretch="false" title="" type="Message" verticalScrolling="true"
		visible="false" xmlns="sap.m">
		<content>
			<Text text="{i18n>TEXT_REGISTRATION_QUESTION}"></Text>
		</content>
		<beginButton>
			<Button press="handleRegisterButton" text="{i18n>LABEL_BUTTON_REGISTER}"/>
		</beginButton>
		<endButton>
			<Button press="handleLogonButton" text="{i18n>LABEL_BUTTON_LOGON}"/>
		</endButton>
	</Dialog>
</core:FragmentDefinition>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Elena Makarenko
Feb 14, 2017 at 01:28 PM
0

Hello Miroslav,

can you create a working example that we can analyze. Just by reading the code it is difficult to advise.

For example, on jsbin.com, https://plnkr.co or http://codepen.io.

Here you find the instructions how to create a one page example:
https://www.nabisoft.com/tutorials/sapui5/sapui5-single-file-template-using-xmlviews-controllers-fragments-and-custom-controls-for-bug-illustrations-support-requests-or-demos

Share
10 |10000 characters needed characters left characters exceeded