SAP UI5 Application - Scrollbar issues - sapui5

In SAP UI5 application, every table has its own scrollbar. There is one page level scrollbar as well. Problem is, to see all the rows of the table I have to use, both the scrollbars. For example, if I am scrolling the table, once it reaches the bottom (of the page not table), scroll disappears. Now to see remaining of the rows, I have to use Page scrollbar and move it down. Then again I can see table scroll and can move below. This means i have to use 2 scrollbars for viewing the rows. Any way to avoid this?
Second issue: If I don't use tag proper page level scroll does not appear. A very long scroll thumb appears (for example if I use semantic page tag as shown below, the scroll thumb is as good as body in length, with very little area to move as track)
ABC.xml
<mvc:View controllerName="com.ABC" xmlns:layout="sap.ui.layout" xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:semantic="sap.m.semantic">
//Here instead of semantic page if I use
// <Page class="sapUiNoMargin maxPage" showHeader="false"> it works fine
with proper page scroll of nice thumb length
<semantic:SemanticPage busy="{sharedApp>/oBusy/busy}" busyIndicatorDelay="{sharedApp/oBusy/delay}" id="page" showSubHeader="false">
<semantic:content>
<core:Fragment id="ordersGrowlNotifier" fragmentName="com.ASD" type="XML"/>
<IconTabBar id="order-tabs" select="onTabChangeEvent" expandable="false" class="tabs">
<items>
<IconTabFilter text="Order" key="cart_tab">
<content>
<VBox>
<items>
<core:Fragment fragmentName="com.Order" type="XML"/>
</items>
</VBox>
</content>
</IconTabFilter>
<IconTabFilter id="orderdetails-tab-track" key="track_tab" text="Track" visible="{orderMenu>/TrackVisible}" >
<content>
<VBox>
<items>
<core:Fragment fragmentName="com.XYZ" type="XML"/>
</items>
</VBox>
</content>
</IconTabFilter>
</items>
</IconTabBar>
</semantic:content>
</semantic:SemanticPage>
</mvc:View>

Related

Scrolling Issue when Page placed within Page in SAPUI5

I have a requirement where I need to place an sap.m.Page within another sap.m.Page, which I am aware is not recommended. The issue I'm facing is that I'm trying to enable scrolling for only the outer page; but the scrolling does not dynamically increase as I expand content inside the inner page. There is a lot of vertical content inside the inner page and is not entirely visible since the scrolling does not increase along with the expanded panels.
Even this does not resolve my issue. Kindly assist.
SAPUI5 version: 1.38.37
Layout of the outer page:
<mvc:View ...>
<Page showHeader="false">
<content>
<IconTabBar>
<items>
<IconTabFilter>
<content>
<mvc:XMLView viewName="namespace.view.InnerView1" displayBlock="true"/>
</content>
</IconTabFilter>
<IconTabSeparator icon=""/>
.
//multiple IconTabFilters here
.
</items>
</IconTabBar>
</content>
</Page>
</mvc:View>
Layout of the inner page (InnerView1):
<mvc:View ...>
<Page showHeader="false" enableScrolling="false">
<content>
.
//multiple expandable/collapsible Panels here
.
</content>
<footer floatingFooter="false">
<Toolbar>
<ToolbarSpacer/>
.
//multiple Buttons here
.
</Toolbar>
</footer>
</Page>
</mvc:View>
The Panels in the inner page are initially collapsed but they are expandable. But if all Panels are expanded in the running app, then the last couple of Panels are not accessible with the scrolling. i.e. the scrollbar does not adjust as per the panels' height.
Try using:
enableScrolling="false" //for disabling
enableScrolling="true" //for enabling

How can a dialog determine the correct size for contained NavContainers?

I want to add a popup to my application that contains a NavContainer. I need this to switch between two different views within the popup later. Now the NavContainer seems to need a fixed value for height and width to display content. Otherwise the popup will only be displayed in the size of the header and footer line. I realized that I can fix the size, but that's not the sense of a responsive application.
My code looks like this without the fixed information:
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
>
<Dialog id="genericDialog"
showHeader="false"
title="Detail View"
>
<NavContainer>
<Page id="page1">
<List items="{/avGenericSet}">
<CustomListItem class="sapUiResponsiveMargin">
<ObjectIdentifier title="{title}"/>
<Input value="{value}"/>
</CustomListItem>
</List>
</Page>
<Page id="page2">
<!-- ... -->
</Page>
</NavContainer>
<endButton>
<Button text="Close" press="closeGenericDialog"/>
</endButton>
</Dialog>
</core:FragmentDefinition>
The behavior can be observed in all popup types (Dialog, Popover, ResponsivePopover). Does any of you know a workaround or do I have to say goodbye to a "responsive" popup?
Try with contentHeight="100%" (and contentWidth if required) from the Dialog. Here is an example: https://embed.plnkr.co/7nimup1UMGsifeDQ?show=view/fragment/Dialog.fragment.xml,preview

m.IconTabBar: How do I make tab's content scrollable?

I have a view structure like this:
<mvc:View>
<IconTabBar>
<items>
<IconTabFilter>
<SplitApp/>
</IconTabFilter>
<IconTabFilter>
<Panel>
</Panel>
<Panel>
</Panel>
</IconTabFilter>
</items>
</IconTabBar>
</mvc:View>
SplitApp looks fine and allows scrolling its content, but panels overflow and no scrolling is enabled. I thought I should wrap either IconTabBar or panels into some control like Page, VerticalLayout, or VBox, but nothing changes. Also I tried to set overflow:scroll for IconTabBar in CSS but in this case, the content of last panel moves out of IconTabBar.
What can I do?
Finally it works:
<mvc:View>
<IconTabBar stretchContentHeight="true">
<items>
<IconTabFilter>
<SplitApp/>
</IconTabFilter>
<IconTabFilter>
<ScrollContainer height="100%" vertical="true">
<Panel>
</Panel>
<Panel>
</Panel>
</ScrollContainer>
</IconTabFilter>
</items>
</IconTabBar>
</mvc:View>

Fiori $expand with CRM data

I'm having some sort of rudimentary problem with navigation in my sapui5 fiori app. I'm just trying to navigate from Opportunities to Complex Notes, but it's not working at all. Here is a stripped down version of my simple view. There is no logic in any controller. As simple as I could imagine it. Because it's so simple I'm thinking I'm reading the odata wrong. So here is a link to that odata. I really appreciate it, I'm spinning my wheels on this one and I'm sure it's something ridiculous. Always is.
<mvc:View xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
controllerName="BlankDocumentToBeDeletedLater.controller.View1" displayBlock="true">
<App>
<pages>
<Page title="{i18n>title}">
<content>
<List noDataText="Drop list items here" id="__list0" items="{ path : '/Opportunities', parameters:{'$expand' : 'ComplexNotes'}}">
<items>
<CustomListItem>
<content>
<Title text="ID : {Guid}"></Title>
<List items="{ComplexNotes}">
<items>
<ObjectListItem title="whatevs" intro="{HeaderGuid}">
</ObjectListItem>
</items>
</List>
</content>
</CustomListItem>
</items>
</List>
</content>
</Page>
</pages>
</App>
“$” for expand is only needed on OData V4;
“/Opportunities” into the path for “listitems”;
text=”ID: {Guid}” won’t work, it needs a formatter to join the fixed text to the Guid property;
I've never seen a list in a list – the developer should try with the parent list first.
Check in the chrome network the request and response that is created by the UI5 binding.

UI5 Tiles to top of page

I'm new to UI5 and try to display some Tiles on a page.
However, they appear in the center of the screen, and I would like to have it at the top.
Below it is a graph that now doesnt even appear on the page without scrolling.
How do get it to the top of the page and remove the bottom margins ?
View:
<TileContainer
id="container"
tiles="{deviceData>/d/results}">
<StandardTile
number="BBB"
numberUnit="CCC"
title="ZZZ"
info="XXX"
infoState="CCC" />
</TileContainer>
<l:C3Chart id="chart1" class="c3Chart" height="300px" width="100%" columns="{cols}" type="{timeseries}" />
</Page> </mvc:View>
Set the height of your tile container to 50% ( or whatever suits your requirements).
code:
<TileContainer tiles='{/}' height='50%'>
<tiles>
<StandardTile title='{title}'>
</StandardTile>
</tiles>
</TileContainer>
You likely dont need a TileContainer here (tile container is full screen component to use when you have an unknown -but important- number of tiles).
You should use a simpler container like an HBox here
<HBox
id="container"
items="{deviceData>/d/results}">
<StandardTile
number="BBB"
numberUnit="CCC"
title="ZZZ"
info="XXX"
infoState="CCC" />
</HBox>