如何在sap.m.Page上获取垂直滚动条

时间:2016-12-15 04:10:07

标签: sapui5

一切都很好但是当内容超出页面时,滚动条不会出现。我正在使用滚动容器仍无法获取滚动条。

以下是代码: -

<core:View xmlns:core="sap.ui.core" 
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m" 
xmlns:blockcolor="sap.uxap.sample.SharedBlocks"
controllerName="com.sg.mobile.controller.Product" 
xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="" showHeader="false" class="pagebag" >
   <ScrollContainer
        height="100%"
        width="100%"
        horizontal="true"
        vertical="true"
        focusable="true">  
    <Bar class="loginpage">
        <contentMiddle><Text text="Categories" class="llg"/> </contentMiddle>
        <contentLeft><Button  icon="sap-icon://sys-back"  press="goToProducts" ></Button>  </contentLeft>                      
    </Bar>
     <FlexBox alignItems="Start" justifyContent="End" class="logout">
         <items>
             <Panel class="kartBadgePanel">
                <Button icon="sap-icon://cart" id="shopKart" press="viewShoppingCart"/> 
                <Label class="w3-badge w3-green" text="6" id="kartLabel" ></Label>
            </Panel>
            <Button icon="sap-icon://log" press="logout" />      
        </items>
     </FlexBox>

        <FlexBox alignItems="start" justifyContent="Center">
            <VBox justifyContent="Center">
                <HBox alignContent="Center" fitContainer="true">
                <Carousel class="sapUiContentPadding "
                    loop="true">
                    <Image src="images/solor1.png" alt="Example picture of speakers"
                         />
                    <Image src="images/solor2.png" alt="Example picture of USB flash drive"
                         />
                    <Image src="images/solor3.png" alt="Example picture of spotlight"
                         />
                </Carousel>
                </HBox>
            </VBox>
        </FlexBox>
         <Table id="idProductTable" items="{/singleproduct}">       
            <columns>
                <Column  styleClass="borderBlack sapUiNoContentPadding"/>                   
            </columns>

            <items>
                <ColumnListItem>
                    <cells> 

                       <Panel height="auto" width="auto" class="sapUiNoContentPadding  productPanel" id="panel">
                        <Table id="sotable" class="tblCls">

                            <columns>
                                <Column />                          
                                <Column styleClass="alignRight"/>                                       
                            </columns>
                            <items>
                                <ColumnListItem>

                                  <cells>     
                                   <Text text="Product Id" />
                                   <Text text="{productId}" class="prodId"/>     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Category" />
                                   <Text text="{categoryName}" />     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Product Name" />
                                   <Text text="{productName}" />     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Unit Of Measurement" />
                                   <Text text="{unitOfMeasurement}" />     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Product Description" />
                                   <Text text="{productDescription}" />     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Unit Price" />
                                   <Text text="{unitPrice}" />     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Base price" />
                                   <Text text="{baseprice}" />     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Discount" />
                                   <Text text="{discount}" />     
                                  </cells>
                                 </ColumnListItem>
                                 <ColumnListItem>
                                  <cells>     
                                   <Text text="Transport Charges" />
                                   <Text text="{transportCharges}" />     
                                  </cells>
                                 </ColumnListItem>
                            </items>
                        </Table>
                        </Panel>                
                    </cells>
                </ColumnListItem>
            </items>
        </Table>
        <FlexBox justifyContent="Center" alignItems="Center">
            <VBox alignItems="Center">
                <HBox>
                    <Button id="addToCartButton" text="Add to Cart" type="Accept" icon="sap-icon://cart"
                        press="onAddProductToCart"></Button>

                </HBox>
            </VBox>
        </FlexBox>


    </ScrollContainer> 
</Page>

你能帮我找一下为什么我的页面上没有滚动条吗?

0 个答案:

没有答案