页脚不会停留在底部

时间:2017-05-25 11:19:42

标签: xml sapui5 sap-web-ide

我正在尝试在Sap Web IDE上创建一个简单的规划应用程序,我有这个问题,页脚不会停留在底部。

索引:

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <link href="https://procensus.com/favicon.ico" rel="shortcut icon" type="image/x-icon" />

    <title>Procensus</title>

    <script id="sap-ui-bootstrap"
        src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
        data-sap-ui-libs="sap.m"
        data-sap-ui-theme="sap_bluecrystal"
        data-sap-ui-xx-bindingSyntax="complex"
        data-sap-ui-preload="async"
        data-sap-ui-compatVersion="edge" 
        data-sap-ui-resourceroots='{"zapp_rej_absence": "./", "sap.ui.demo.mock": "mockdata"}'>
    </script>

    <!-- Application launch configuration -->
    <script>

        sap.ui.getCore().attachInit(function() {
        new sap.m.Shell({
            app: new sap.m.App({
                pages: [
                    new sap.m.Page({
                        title: "Procensus Planning Calender",
                        enableScrolling: true,
                        content: [ new sap.ui.core.ComponentContainer({
                            name: "zapp_rej_absence"
                        })]
                    })]
            })
        }).placeAt("content");
    });

    </script>
</head>

<!-- UI Content -->
<body class="sapUiBody" id="content" role="application">
</body>

XML:

<mvc:View 
controllerName="zapp_rej_absence.controller.Main" 
xmlns:l="sap.ui.layout"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
xmlns:commons="sap.ui.commons"
xmlns:core="sap.ui.core"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page
    title="{i18n>loginTitle}"
    showHeader="true">
    <content>

        <VBox alignItems="Center" class="sapUiLargeMarginTop">
            <Panel backgroundDesign="Solid"> 
                <Image width="auto" height="10em" id="__image1" src="images/logo/Logo_iQos.jpg" 
                    class="sapUiSmallMargin"/>
                <VBox alignItems="Center" >
                    <Input id="user" type="Text" placeholder="{i18n>userName}"/>
                    <Input id="pass" type="Password" placeholder="{i18n>password}" />
        <Button class="sapUiSmallMarginTop" text="Login" width="17em" type="Emphasized" press="_logIn" submit="_logIn" />   
                </VBox>

            </Panel>
        </VBox>

    </content>
    <footer>
        <Bar>
            <contentLeft>
                <Text text="{version>/version} {version>/pool}" /> <!-- major.minot.micro - major keep at 1 until major re-release , minor - increment on new feature ; micro - increment on bug fix or minor feature change -->   
            </contentLeft>
        </Bar>
    </footer>
</Page>

Final Result - Mine

Result from Loki code

*注意:日历需要(据我所知)在Panel标签内,因此它不会消失。由于Panel标签上不存在页脚,因此在关闭Panel 1后我创建了一个Page标签。

2 个答案:

答案 0 :(得分:1)

我做了改动。您需要在视图中绑定您的模型和i8nproperties中的值。我没有值和i8nproperties所以留空,但我创建了一个骨架,如果它是正确的你可以参考它。

检查以下三个图像:1)index.html 2)view.xml 3)输出 index.html

View1.view.xml

output

答案 1 :(得分:0)

我认为你的xml结构是错误的。如果你这样做它应该工作:

<mvc:View .......
<Page title="Your Title">
<content>
    <!-- your panel with calender here -->
</content>
<footer>
    <!-- your footer code here -->
</footer>

</Page>

</mvc:View>

这里有一个很好的代码示例: https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.Page/code

你可以看到它在这里的样子: https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.Page/code