Wrong Panel content height with ui.table (visibleRowCountMode="Auto") - sapui5

I want to have a layout which has a fixed size panel with a form at the top and a panel with a grid which takes the remaining space at the bottom. I have managed that the panels have the correct size - so the section html tag of the grid's panel has 100% and correctly spans but the height of the nested div for the content is calculated to 0px.
What definition is necessary or missing so that the grid takes the complete remaining space?
<mvc:View
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
xmlns:t="sap.ui.table"
height="100%">
<l:FixFlex class="fixFlexFixedSize" fixContentSize="100px">
<l:fixContent>
<Panel class="sapUiNoContentPadding">
<headerToolbar>
<Toolbar>
<Title text="Form" level="H2" />
</Toolbar>
</headerToolbar>
<content>
<f:Form editable="true">
<f:layout>
<f:ResponsiveGridLayout
labelSpanL="2"
labelSpanM="2"
emptySpanL="1"
emptySpanM="1"
columnsL="2"
columnsM="2" />
</f:layout>
<f:formContainers>
<f:FormContainer>
<f:formElements>
<f:FormElement label="Lastname">
<f:fields>
<Input id="lastname" />
</f:fields>
</f:FormElement>
</f:formElements>
</f:FormContainer>
<f:FormContainer>
<f:FormElement label="Firstname">
<f:fields>
<Input id="firstname" />
</f:fields>
</f:FormElement>
</f:FormContainer>
</f:formContainers>
</f:Form>
</content>
</Panel>
</l:fixContent>
<l:flexContent>
<Panel height="100%" class="sapUiNoContentPadding">
<headerToolbar>
<Toolbar>
<Title text="Grid" level="H2" />
<ToolbarSpacer />
<Button icon="sap-icon://add" text="new" press="newEntry" />
</Toolbar>
</headerToolbar>
<content>
<t:Table
rows="{entries>/result}"
enableSelectAll="false"
selectionMode="None"
visibleRowCountMode="Auto"
height="100%">
<t:columns>
<t:Column width="5rem" >
<Label text="{i18n>entrieslist.column.name}" />
<t:template>
<Link text="{entries>lastname}" press="showDetailsPage"/>
</t:template>
</t:Column>
<t:Column width="5rem" >
<t:template>
<Text text="{entries>firstname}" />
</t:template>
</t:Column>
<t:Column width="11rem" sorted="true" sortProperty="{entries>telephone} ">
<Label text="{i18n>entrieslist.column.number}" />
<t:template>
<Text text="{entries>telephone}" />
</t:template>
</t:Column>
<t:Column width="11rem" >
<Label text="{i18n>entrieslist.column.street}" />
<t:template>
<Text text="{entries>street}" />
</t:template>
</t:Column>
</t:columns>
</t:Table>
</content>
</Panel>
</l:flexContent>
</l:FixFlex>
</mvc:View>

Related

IconTabBar with stretchcontentheight makes my header disappear in SAPUI5

I have this issue where I want to have the scrollbar active only for the content of my IconTabBar, while keeping the header fixed. I read here in stackoverflow that I should put all the content inside a ScrollContainer, and then set the stretchContentHeight="true".
But this option kills my header.
this is my code
<mvc:View
controllerName="Quickstart.App"
displayBlock="true"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
xmlns:l="sap.ui.layout"
xmlns:core="sap.ui.core"
xmlns:tnt="sap.tnt"
height="100%">
<App id="app">
<Page id="intro" showHeader="false" enableScrolling="false">
<tnt:ToolHeader height="10rem">
<Image src="./images/image.png"/>
<Text text="title" wrapping="false" />
<ToolbarSpacer />
<Button text="Feedback" icon="sap-icon://feedback" type="Transparent" press="onPressFeedback"/>
</tnt:ToolHeader>
<IconTabBar
id="idIconTabBarNoIcons"
items="{/Sheet1}"
class="sapUiResponsiveContentPadding"
expandable="false"
backgroundDesign="Transparent"
applyContentPadding="false"
stretchContentHeight="true">
<items>
<IconTabFilter text="{category_title}" key="info">
<Toolbar class="toolbar_boarder" design="Transparent">
<ToolbarSpacer/>
<Button text="Sort" tooltip="Order Alphabetically" id="IdSortButton" width="70px" press="onPressSort" icon="sap-icon://alphabetical-order" type="Ghost"/>
<Button id="IdExpandButton" tooltip="Additional Information" text="Collapse" class="sapUiTinyMarginEnd" width="101px" press="onPressExpand" icon="sap-icon://collapse-all" type="Ghost"/>
</Toolbar>
<ScrollContainer id="Scroll" class="sapUIBody" height="100%" width="100%" horizontal="false" vertical="true">
<l:Grid containerQuery="true" content="{path:'tools', templateShareable:false}" id="gridId">
<Panel class="iconFilters" fieldGroupIds="idPanel" >
<HBox>
<!-- <core:Icon press="onPressToolIcon"
src="{tool_icon_url}" size="2rem" color="Default" class="" /> -->
<Image src="{tool_icon_url}" width="2.2rem" press="onPressToolImage"></Image>
<Link text="{tool_title}" wrapping="true" target="_blank" href="{tool_redirect_url}" class="sapUiTinyMargin title_header"/>
</HBox>
<!-- Control the size of the line before badges -->
<Toolbar height="6px" width="75%"></Toolbar>
<HBox items="{path:'badges', templateShareable:false}" height="1rem" justifyContent="End" class="drawline">
<core:Icon size="1rem" src="{badge_css_url}" tooltip="{badge_hover_text}" class="badgePadding" />
</HBox>
<VBox height="11rem">
<Label text="Use Cases" class="sapUiTinyTop" design="Bold"/>
<List
items="{path:'usecases', templateShareable:false}"
includeItemInSelection="true">
<CustomListItem>
<HBox class="listItems">
<Text text="• " class="items_circle" />
<FormattedText htmlText="{item}" />
</HBox>
</CustomListItem>
</List>
</VBox>
<VBox height="11rem">
<Label text="Strengths" class="sapUiSmallTop" design="Bold"/>
<List
items="{path:'strengths', templateShareable:false}"
includeItemInSelection="true">
<CustomListItem>
<HBox class="listItems">
<Text text="• " class="items_circle" />
<Text
wrapping="true" text="{item}"/>
</HBox>
</CustomListItem>
</List>
</VBox>
<VBox height="5rem" fieldGroupIds="hideShowElements" visible="true">
<Label text="Best Practices" class="sapUiSmallTop" design="Bold" fieldGroupIds="hideShowElements"/>
<List
items="{path:'best_practices', templateShareable:false}"
includeItemInSelection="true">
<CustomListItem>
<HBox class="listItems">
<Text text="• " class="items_circle2" />
<Link wrapping="true"
text="{best_practices_name}"
target="_blank"
href="{best_practices_url}" />
</HBox>
</CustomListItem>
</List>
</VBox>
<VBox class="" height="5rem" visible="true" fieldGroupIds="hideShowElements">
<Label text="Content Responsibility" class="sapUiSmallTop" fieldGroupIds="hideShowElements" design="Bold" visible="true"/>
<List
items="{path:'content_responsibility', templateShareable:false}"
includeItemInSelection="true">
<CustomListItem>
<HBox class="listItems">
<Text text="• " class="items_circle" />
<Text
wrapping="true" text="{item}"/>
</HBox>
</CustomListItem>
</List>
</VBox>
<VBox class=" conf_move_down" height="3.5rem" visible="true" fieldGroupIds="hideShowElements">
<Label text="Confidentiality Level" design="Bold" fieldGroupIds="hideShowElements"/>
<HBox class="listItems">
<Text text="• " class="items_circle2" />
<Link wrapping="true"
text="{confidentiality_level}"
target="_blank"
href="{confidentiality_level_url}" />
</HBox>
</VBox>
<VBox class=" expandClassTrue" height="6rem" visible="true" fieldGroupIds="hideShowElements">
<Label text="Support" design="Bold" fieldGroupIds="hideShowElements"/>
<List fieldGroupIds="hideShowElements"
items="{path:'support', templateShareable:false}"
includeItemInSelection="true">
<CustomListItem class="listItems">
<HBox class="listItems">
<Text text="• " class="items_circle2" />
<Link wrapping="true"
text="{support_name}"
target="_blank"
href="{support_url}" />
</HBox>
</CustomListItem>
</List>
</VBox>
</Panel>
</l:Grid>
</ScrollContainer>
</IconTabFilter>
</items>
</IconTabBar>
</Page>
</App>
</mvc:View>
When I use "False" for stretchcontentheight, this is the top of my page:
When I use "true", the header is gone.
Does anyone know how to solve this?
Thank you very much for reading and helping
I fixed my problem with a workaround using custom headers.

SAPUI5 sap.ui.table table issue in EDGE browser : First column with button occupies first rows and then other columns come in to below rows

sap.ui.table is used to create a table with columns. Columns have multiple controls and it has template.
Now in some systems on EDGE Browser, first column comes occupies entire row.
same happens for all visible rows on the screen. Remaining columns comes as a row together.
This is happening only on edge browser.
I tried changing width of all columns to "auto". It doesn't work.
Please help.
<mvc:View controllerName="s2s.delivery.create.controller.Worklist"
xmlns="sap.m" xmlns:l="sap.ui.layout" xmlns:t="sap.ui.table" xmlns:mvc="sap.ui.core.mvc"
xmlns:tnt="sap.tnt" xmlns:core="sap.ui.core">
<Page title="{i18n>panelTitle}">
<core:Fragment fragmentName="s2s.delivery.create.Fragments.ToolHeaderBar"
type="XML" />
<t:Table id="table1" rows="{openShipment>/}"
selectionMode="None" ariaLabelledBy="title"
enableCellFilter="true"
filter="filterOrder"
fixedColumnCount="1">
<t:toolbar>
<Toolbar>
<ToolbarSpacer />
<Button icon="sap-icon://refresh" text = "{i18n>refresh}" press="handleRefresh" type="Emphasized"/>
</Toolbar>
</t:toolbar>
<t:columns>
<!-- <t:Column width="8rem" hAlign="Center"> -->
<t:Column width="auto" hAlign="Center">
<Label text="" />
<t:template>
<Button text="{i18n>Deliver}" type="Emphasized" press="handleDelivery"
icon="sap-icon://shipping-status" />
</t:template>
</t:Column>
<t:Column width="auto"
filterProperty="OrderNo"
defaultFilterOperator="StartsWith"
sortProperty="OrderNo">
<Label width="6rem" text="{i18n>original}" />
<t:template>
<Text text="{openShipment>OrderNo}" />
</t:template>
</t:Column>
<t:Column width="auto" >
<Label width="6rem" text="{i18n>Item}" />
<t:template>
<Text text="{openShipment>ItemsNo}" />
</t:template>
</t:Column>
<t:Column width="auto" sortProperty="GidateInt">
<Label width="6rem" text="{i18n>GIDate}" />
<t:template>
<Text text="{openShipment>GIDate}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>Status}" />
<t:template>
<core:Icon src="sap-icon://color-fill"
color="{path:'openShipment>Status', formatter:'.setStatusColor'}" />
</t:template>
</t:Column>
<t:Column width="auto"
filterProperty="Material"
defaultFilterOperator="StartsWith"
sortProperty="Material" >
<Label text="{i18n>Material}" />
<t:template>
<Text text="{openShipment>Material}"/>
</t:template>
</t:Column>
<t:Column width="16rem">
<Label text="{i18n>matDesc}" />
<t:template>
<Text text="{openShipment>MaterialDesc}"/>
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>OrdQty}" />
<t:template>
<ObjectNumber number="{path:'openShipment>OrderQty', formatter:'.displayDecimal'}" numberUnit="{openShipment>OrderQtyUnit}" />
</t:template>
</t:Column>
<t:Column width="6rem" hAlign="Center">
<Label text="{i18n>AvalQty}" />
<t:template>
<ObjectNumber number="{path:'openShipment>AvailQty', formatter:'.displayDecimal'} " numberUnit="{openShipment>AvailQtyUnit}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>ShipPoint}" />
<t:template>
<Text text="{openShipment>ShippingPoint}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>PrevWork}" />
<t:template>
<Text text="{openShipment>PrevWorkCenter}" />
</t:template>
</t:Column>
<t:Column width="16rem" hAlign="Center"
filterProperty="CustomerName"
defaultFilterOperator="Contains"
sortProperty="CustomerName">
<Label text="{i18n>CustName}" />
<t:template>
<Text text="{openShipment>CustomerName}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>Country}" />
<t:template>
<Text text="{openShipment>Country}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>DocType}" />
<t:template>
<Text text="{openShipment>DocTypeDesc}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center"
filterProperty="Zzaufnr"
defaultFilterOperator="StartsWith"
sortProperty="Zzaufnr">
<Label text="{i18n>ProdOrder}" />
<t:template>
<Text text="{openShipment>Zzaufnr}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>ProdStatus}" />
<t:template>
<Text text="{openShipment>Zzstat}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>packMaterial}" />
<t:template>
<Text text="{openShipment>PackingMaterial}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>packSpec}" />
<t:template>
<Text text="{openShipment>ZzpackagingSpec}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>cutCham}" />
<t:template>
<Text text="{openShipment>Zztext}" />
</t:template>
</t:Column>
<t:Column width="auto" hAlign="Center">
<Label text="{i18n>Operation}" />
<t:template>
<Text text="{openShipment>Zzvornr} - {openShipment>Zzltxa1}" />
</t:template>
</t:Column>
</t:columns>
</t:Table>
</Page>
</mvc:View>

Tiles Not Rendering While Put Inside Grid

I am trying to render StandardTile in a Grid, but due to some reason it's not working. however, it works when I remove the Grid & Panel from my code.
Can anyone point out what exactly am I doing wrong here?
<mvc:View xmlns:mvc="sap.ui.core.mvc"
xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout" xmlns="sap.m"
controllerName="hanaDashBoard.controller.Home">
<Page showHeader="false" enableScrolling="false">
<Toolbar class="sapUiTinyMarginTop" id="toolbar1" height="10%">
<ComboBox id="SidCombo" width="11.5%" showSecondaryValues="true"
items="{
path: '/results'
}" selectionChange="SidSelect">
<core:ListItem key='{Key}' text='{Sid}'
additionalText='{Template}' />
</ComboBox>
<Text id="TemplateText"></Text>
<Text id="SltText"></Text>
<ToolbarSpacer />
<Button id="UserName" icon="sap-icon://kpi-managing-my-area"
enabled="false" type="Transparent" />
</Toolbar>
<l:Grid
id="leGrid"
class="sapUiSmallMarginTop"
hSpacing="2"
visible="false"
>
<l:content>
<Panel width="auto" class="sapUiResponsiveMargin">
<content>
<TileContainer id="container"
width="100%" height="100%" visible="true" tileDelete="handleTileDelete"
tiles="{/TileCollection}">
<StandardTile icon="{icon}" type="{type}" number="{number}"
numberUnit="{numberUnit}" title="{title}" info="{info}"
infoState="{infoState}" press="handleTilepress" />
</TileContainer>
</content>
<layoutData>
<l:GridData span="L12 M12 S12" />
</layoutData>
</Panel>
</l:content>
</l:Grid>
<footer>
<Toolbar>
<ToolbarSpacer />
<Button id="editbutton" text="Edit" press="tilePressed" />
<ToolbarSpacer />
</Toolbar>
</footer>
</Page>
</mvc:View>

How to align control in headerToolbar SAPUI5

I've multiple control in one headerToolbar. I want to align one of them (Seach Field) at the right most. both images are from two different screen size. I use because when i decrease the screen size seachfield should not hide and come at next line.
I want to keep seach field at right most.
the code for this is
<headerToolbar>
<Toolbar id="dsdfgfanfgjd">
<content>
<HBox width='100%' wrap='Wrap'>
<items>
<FormattedText class="customPanelHeader"
htmlText=""/>
<ToolbarSpacer>
<layoutData>
<OverflowToolbarLayoutData priority="NeverOverflow" minWidth="22px"/>
</layoutData>
</ToolbarSpacer>
<SearchField id="searchFilter" placeholder="filter value" value="{/searchFilter}" width="12em"
liveChange=".onChangedSearchFilter" valueLiveUpdate="true"/>
</items>
</HBox>
</content>
</Toolbar>
To keep the SearchBox at the right end irrespective of the screen size, use below code:
<Toolbar height='auto'>
<content>
<HBox width='100%' wrap='Wrap'>
<items>
<Text text='text0' width='3rem' />
<Text text='text1' width='3rem' />
<Text text='text2' width='3rem' />
<Text text='text3' width='3rem' />
<Text text='text4' width='3rem' />
<Text text='text5' width='3rem' />
<Text text='text6' width='3rem' />
<Text text='text7' width='3rem' />
<Text text='text8' width='3rem' />
<Text text='text9' width='3rem' />
<Text text='text10' width='3rem' />
<Text text='text11' width='3rem' />
<Text text='text12' width='3rem' />
<ToolbarSpacer></ToolbarSpacer>
<HBox justifyContent='End'>
<layoutData>
<FlexItemData
growFactor='1'>
</FlexItemData>
</layoutData>
<Input id="searchFilter" class="searchFilterInput"
placeholder="filter value" value="{/searchFilter}" width="100%"
liveChange=".onChangedSearchFilter" valueLiveUpdate="true" />
<core:Icon class="searchFilterIcon" size="1.75rem"
src="sap-icon://search" tooltip="search" />
</HBox>
</items>
</HBox>
</content>
</Toolbar>

How set not-visible an item than not have the "visible" property?

I have a button and a grid below.
Inside the grid I have some elements (input, checkbox, label, ...)
How can I set not visible all the elements inside the grid together together at once?
<Grid xmlns="sap.ui.layout" id="idGrid">
<content>
<Label xmlns="sap.m"
id="idLabel"
design="Standard"
text="the label">
</Label>
<Input xmlns="sap.m"
id="idInput"
value="the input">
</Input>
</content>
</Grid>
put the Grid content into a VerticalLayout.
sap.ui.controller("test.controller", {
handleHide: function(oEvent) {
var bt = oEvent.getSource();
var vl = this.getView().byId("vlContent");
if (vl.getVisible()) {
vl.setVisible(false);
bt.setText("Show");
} else {
vl.setVisible(true);
bt.setText("Hide");
}
}
});
var oView = sap.ui.xmlview({
viewContent: jQuery("#view1").html()
});
oView.placeAt("content");
<script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"></script>
<script id="view1" type="sapui5/xmlview">
<mvc:View xmlns:l="sap.ui.layout" controllerName="test.controller" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:f="sap.ui.layout.form">
<l:Grid defaultSpan="L12 M12 S12" width="auto" id="idGridDetail">
<l:content>
<l:VerticalLayout id="vlContent">
<f:SimpleForm id="SimpleFormDisplay111" minWidth="1024" maxContainerCols="2" editable="false" layout="ResponsiveGridLayout" title="" labelSpanL="3" labelSpanM="3" emptySpanL="4" emptySpanM="4" columnsL="1" columnsM="1">
<f:content>
<Label text="Se OC valido per Incas" />
<Text text="{/seOCValidoPerIncas}" />
<Label text="ocdc" id="idLabelCdc" />
<Text text="{/cdc}" id="idTextCdc" />
<Label text="Ultimo passaggio Incas" />
<Text text="{/ultimoPassaggioIncas}" />
</f:content>
</f:SimpleForm>
<Panel expandable="true" expanded="true" headerText="Passaggio da Rampa a Incas">
<content>
<Table xmlns="sap.m" id="idTable_RampaToIncas_testate" items="{
path: '/passaggioRampaToIncas/testate'}">
<headerToolbar>
<Toolbar>
<Label text="Testate" design="Bold"></Label>
</Toolbar>
</headerToolbar>
<items>
<ColumnListItem>
<cells>
<Text text="{dataIns}" />
<Text text="{sePassatoABridge}" />
<Text text="{comando}" />
<Text text="{comando_desc}" />
<Text text="{tag}" />
<Text text="{viaggio}" />
</cells>
</ColumnListItem>
</items>
</Table>
<Label text=""></Label>
<Table xmlns="sap.m" id="idTable_RampaToIncas_righe" items="{
path: '/passaggioRampaToIncas/righe'}">
<headerToolbar>
<Toolbar>
<Label text="Righe" design="Bold"></Label>
</Toolbar>
</headerToolbar>
<items>
<ColumnListItem>
<cells>
<Text text="{dataIns}" />
<Text text="{sePassatoABridge}" />
<Text text="{comando}" />
<Text text="{comando_desc}" />
<Text text="{riga}" />
<Text text="{articolo}" />
</cells>
</ColumnListItem>
</items>
</Table>
<Label text=""></Label>
<Table xmlns="sap.m" id="idTable_RampaToIncas_eventiAttivazione" items="{
path: '/passaggioRampaToIncas/attivazione'}">
<headerToolbar>
<Toolbar>
<Label text="Eventi Attivazione" design="Bold"></Label>
</Toolbar>
</headerToolbar>
<items>
<ColumnListItem>
<cells>
<Text text="{dataIns}" />
</cells>
</ColumnListItem>
</items>
</Table>
</content>
</Panel>
<Panel expandable="true" expanded="true" headerText="Passaggio da Incas a Rampa">
<content>
<Table xmlns="sap.m" id="idTable_IncasToRampa_righe" items="{
path: '/passaggioIncasToRampa/righe'}">
<headerToolbar>
<Toolbar>
<Label text="Righe" design="Bold"></Label>
</Toolbar>
</headerToolbar>
<items>
<ColumnListItem>
<cells>
<Text text="{dataIns}" />
<Text text="{riga}" />
<Text text="{articolo}" />
<Text text="{qta_caricata}" />
<Text text="{qta_prevista}" />
</cells>
</ColumnListItem>
</items>
</Table>
</content>
</Panel>
</l:VerticalLayout>
</l:content>
</l:Grid>
<Button text="Hide" press="handleHide" />
</mvc:View>
</script>
<boy class="sapUiBody" id="content" />