Strange behavior of IconTabBar with GenericTile - sapui5

Why does the XML tree on the picture looks like shown on the second picture? MessageStrip tries to get into the content area of IconTabBar even jumping over 4 elements and tiles get out by any means. There are no restrictions in documentation on what can placed in the IconTabBar or in the IconTabFilter. GenericTile is not a layout which is supposed to take the whole place on the screen. How to put tiles into the content of IconTabBar?
Here's the code of the view:
<mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc">
<IconTabBar id="idTopLevelIconTabBar" class="sapUiResponsiveContentPadding">
<items>
<IconTabFilter id="start" icon="sap-icon://hint">
<GenericTile class="sapUiMediumMarginBeginEnd sapUiLargeMarginTop tileLayout"
header="Sales Fulfillment Application Title"
subheader="Subtitle"
>
<TileContent unit="EUR" footer="Current Quarter">
<ImageContent src="sap-icon://home-share"/>
</TileContent>
</GenericTile>
<GenericTile class="sapUiMediumMarginBeginEnd sapUiLargeMarginTop tileLayout"
header="Manage Activity Master Data Type"
subheader="Subtitle"
>
<TileContent />
</GenericTile>
<GenericTile class="sapUiMediumMarginBeginEnd sapUiLargeMarginTop tileLayout"
header="Manage Activity Master Data Type With a Long Title Without an Icon"
subheader="Subtitle Launch Tile" mode="HeaderMode"
>
<TileContent unit="EUR" footer="Current Quarter" />
</GenericTile>
<GenericTile class="sapUiMediumMarginBeginEnd sapUiLargeMarginTop tileLayout"
header="Jessica D. Prince Senior Consultant"
subheader="Department"
>
<TileContent/>
</GenericTile>
<MessageStrip
type="Information"
showIcon="true"
text="Another IconTabFilter"
/>
</IconTabFilter>
<IconTabFilter id="layouts" icon="sap-icon://bookmark">
<!-- ... -->
</IconTabFilter>
</items>
</IconTabBar>
</mvc:View>

The solution was to remove my custom CSS (e.g. tileLayout) and to add any margin class (e.g. "sapUiLargeMarginTop") to the Message Strip so that Generic Tile fits inside an IconTabFilter.
The result

Related

SAPUI5 ColumnListItem, icon need to be displayed on the left hand side

I'm using table and using this property.
<ColumnListItem type="Detail" detailPress="onShowItemEditDialog">
I want the place the icon on the left side.
Because I use responsivePopover.The popover is opening on the right side.
I think I will change the table elements in this popover.
Or is there another way to change the elements of the table?
What can be done for table edit?
Please help.
you can build your own ListItem.
<List headerText="Custom Content" mode="Delete" items="{path: '/ProductCollection'}" >
<CustomListItem>
<HBox>
<core:Icon size="2rem" src="sap-icon://attachment-photo" class="sapUiSmallMarginBegin sapUiSmallMarginTopBottom" />
<VBox class="sapUiSmallMarginBegin sapUiSmallMarginTopBottom" >
<Link text="{Name}" target="{ProductPicUrl}" press="handlePress"/>
<Label text="{ProductId}"/>
</VBox>
</HBox>
</CustomListItem>
</List>
This example is taken from: https://openui5.hana.ondemand.com/#/sample/sap.m.sample.CustomListItem/code
A little tweak worked for me. Use the below code appropriately.
onAfterRendering: function() {
$( "thead .sapMListTblNavCol" ).insertAfter( "thead .sapMListTblHighlightCol" );
$( "tbody .sapMListTblNavCol" ).insertAfter( "tbody .sapMListTblHighlightCell" );
},

Two m.Slider controls, same properties, yet one doesn't show the marks

enableTickmarksis true for both slider controls, yet only one shows them?
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core">
<Dialog title="{Title}" icon="sap-icon://create">
<beginButton>
<Button text="{i18n>cancel}" press="handleCloseCompetencySelection"/>
</beginButton>
<endButton>
<Button type="Accept" text="{i18n>submit}" press="handleSubmitCompetencySelection"/>
</endButton>
<content>
<FlexBox direction="Column" alignItems="Center" class="sapUiMediumMarginTopBottom">
<items>
<HBox><Label text="{i18n>required}: "/><Label id="RequiredProficiencyLabel" text="{ProfidrDescr}" design="Bold"/></HBox>
<Slider id="RequiredProficiencySlider" enabled="false" liveChange="onSliderChange" enableTickmarks="true" min="0" max="10"
class="sapUiSmallMarginBottom" width="400px"/>
</items>
</FlexBox>
<FlexBox direction="Column" alignItems="Center" class="sapUiMediumMarginTopBottom">
<items>
<HBox><Label text="{i18n>achieved}: "/><Label id="ProficiencyLabel" text="" design="Bold"/></HBox>
<Slider id="ProficiencySlider" liveChange="onSliderChange" enableTickmarks="true" min="0" max="10" class="sapUiSmallMarginBottom"
width="400px"/>
</items>
</FlexBox>
<MessageStrip text="{i18n>dragMessage}" type="Information" showIcon="true" class="sapUiMediumMargin"></MessageStrip>
</content>
</Dialog>
</core:FragmentDefinition>
There was a bug which is fixed as of version 1.52. The z-index of tickmarks was incorrectly set. Here you can see that the tickmarks are displayed correctly in Dialog: https://jsbin.com/ruqosej/edit?html,js,output
Funny story:
for "disabled" slider that tickmark looks bolder and perceptible than "enabled" one
the second slider shows the tickmarks, but you are not able to see them due to the very light grayscale color of the marks (to make sure that it is true, try to look at the sceen with different angle and you will see the tickmarks of the second slider; or use another display)

How to change the font size for sap.m.Label without custom CSS?

How to change the font size for sap.m.Label without CSS.
<Label text="NAME" />
Only way to change Label Font size is by using a custom CSS file.
Add a n ew folder under webapp and name it "css".
Add a file called "style.css" under the new folder.
Add the following style in style.css :
.myApp .smallLabel {
font-size: x-small;
}
Apply the style on your label :
<App class="myApp">
<pages>
<Page title="{i18n>homePageTitle}">
<content>
<Panel>
<content>
<Label text="{path: 'Recipes>Title'}" class="smallLabel"/>
</content>
</Panel>
</content>
</Page>
</pages>
</App>

How to make text appear fully in IconTabBar?

I am using IconTabBar in my application and the text (heading for the tab) is not displaying fully. Half of the text gets cut.
<IconTabBar class="sapUiResponsiveContentPadding">
<items>
<IconTabFilter
icon="sap-icon://approvals"
text="Set Values for Mass Change" design="Horizontal"
>
<mvc:XMLView viewName="abc.view.selectionPage"/>
</IconTabFilter>
<IconTabSeparator icon="sap-icon://open-command-field"/>
</items>
</IconTabBar>
So here the text, which should be "Set Values for Mass Change", is output as "Set Values for Mass..."
The text is cut in half due to two properties set in the classes :
sapMITBHorizontalWrapper ( for the Wrapper Div) and
sapMITBHorizontal.sapMITBFilter>.sapMITBHorizontalWrapper>.sapMITBText ( Max-width for the displayed Text )
Here, max-width is set to 7.5rem and text-overflow is set to : ellipsis.
Somehow, its not possible to add a class to IconTabFilter (bad) but you can add class to IconTabBar. So, to solve this I've increased the max-width to 10rem. You can increase and decrease max-width to suit your requirements.
Below is the css code:
.myWidth .sapMITBHorizontalWrapper {
max-width: 10rem;
}
.myWidth .sapMITBHorizontal.sapMITBFilter>.sapMITBHorizontalWrapper>.sapMITBText {
max-width: 10rem;
}
View:
<IconTabBar class="sapUiResponsiveContentPadding myWidth">
<items>
<IconTabFilter id='myId' icon="sap-icon://approvals" class='' text="Set Values for Mass Change" design="Horizontal">
<!-- <mvc:XMLView viewName="abc.view.selectionPage"/> -->
</IconTabFilter>
<IconTabSeparator icon="sap-icon://open-command-field"/>
<IconTabFilter icon="sap-icon://approvals" class='' text="Short Text" design="Horizontal">
<!-- <mvc:XMLView viewName="abc.view.selectionPage"/> -->
</IconTabFilter>
<IconTabFilter icon="sap-icon://approvals" class='' text="Shorter" design="Horizontal">
<!-- <mvc:XMLView viewName="abc.view.selectionPage"/> -->
</IconTabFilter>
<IconTabFilter icon="sap-icon://approvals" class='' text="This is a Big text." design="Horizontal">
<!-- <mvc:XMLView viewName="abc.view.selectionPage"/> -->
</IconTabFilter>
<IconTabFilter icon="sap-icon://approvals" class='' text="Lil" design="Horizontal">
<!-- <mvc:XMLView viewName="abc.view.selectionPage"/> -->
</IconTabFilter>
</items>
</IconTabBar>
If the text becomes too long, consider to display texts only aligning with Fiori Design Guidelines:
If your labels get truncated, consider using shorter labels or text tabs (without icons), as text tabs cannot get truncated. [source]
Internally, the IconTabHeader (the header control for IconTabBar) then applies the style class sapMITBTextOnlysrc which excludes max-width.src
<IconTabBar>
<items>
<IconTabFilter text="products" count="20"/>
<IconTabFilter text="jkjlsdfjalkfak awfgvbf uwewrw fwkjfv dqw qlkwejqwklejdifsuvnvxdlcmeq" count="4"/>
<!-- ... -->
</items>
</IconTabBar>
Since the length is basically limitless, it's still recommended to ensure that the texts do not become too long.
try below
.sapMITBFilter .sapMITBText {
width: 10rem;
}
.sapMITBTab {
width: 10rem;
}

Aspx grid view FileUpload

Bllow is my AspxGridview syntax
<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="Menu_ID"
OnCellEditorInitialize="ASPxGridView1_CellEditorInitialize" OnCustomUnboundColumnData="ASPxGridView1_CustomUnboundColumnData">
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
<EditButton Visible="True">
</EditButton>
<NewButton Visible="True">
</NewButton>
<DeleteButton Visible="True">
</DeleteButton>
<CustomButtons>
<dx:GridViewCommandColumnCustomButton Text="Create a Copy" ID="Copy" />
</CustomButtons>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn Caption="Module_ID" FieldName="Module_ID" UnboundType="Integer"
VisibleIndex="1">
</dx:GridViewDataTextColumn>
<dx:GridViewDataButtonEditColumn Caption="Target_URL" FieldName="Target_URL" UnboundType="String"
VisibleIndex="2">
<PropertiesButtonEdit>
<Buttons>
<dx:EditButton Text=".." Width="5px">
</dx:EditButton>
</Buttons>
</PropertiesButtonEdit>
</dx:GridViewDataButtonEditColumn>
<dx:GridViewDataTextColumn Caption="Menu_ID" FieldName="Menu_ID" UnboundType="Integer"
VisibleIndex="3">
</dx:GridViewDataTextColumn>
</Columns>
</dx:ASPxGridView>
AspxGridview edit/insert mode Click on Target_URL column button i want to FileUpload .
Please take a look at the following example posted in our site:
http://www.devexpress.com/Support/Center/CodeCentral/ViewExample.aspx?exampleId=E95