Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Dhanasupriya
Active Participant
10,081
Hello All

This post is on the line breaks using SAP UI5 controls. We might have requirements to display wide range of information in 2-3 lines in order to avoid occupying the whole screen for better look & feel and UI experiences in SAP UI5 applications. Here is the demo for such needs and can be achieved using line feed and carriage return.

It's always a best practice to use the combination of line feed and carriage return.

  • Line feed: moving the test to next line.

  • Carriage return: a space between the words.


Line Breaks using line feed and carriage return in <ViewName>.view.xml,  <FragmentName>.fragment.xml:Line Breaks using line feed and carriage return in <ViewName>.view.js,  <FragmentName>.fragment.js, <ControllerName>.controller.js, i18n files.i18n:sap.m.Label: For Label, set wrapping property to true. Line break would work in combination with wrapping and \r\n.
	<Label text="{i18n>Label}" wrapping="true" />

sap.m.<control>: Tooltip for SAP UI5 controls:
	<Button text="Tooltip" tooltip="{i18n>Label}" />

sap.m.Text:
	<Text text="{i18n>Label}" />

sap.m.MessageStrip:sap.m.MessageStrip
<MessageStrip text="{i18n>MessageStrip}"  enableFormattedText="true"/>

i18n: key-values for sap.m.MessageStrip:
MessageStrip=Default <em>(Information)</em> with default icon and <strong>close button</strong>:

sap.m.FormattedText: sap.m.FormattedText

Output:Thank you!!

#EnhanceLearning

BR// Dhanasupriya Sidagam
4 Comments
Marian_Zeis
Active Contributor
Hi dhanasupriya1498

thank you for your blog post. It´s a nice topic to talk about.

As you write "EnhanceLearning" would you be able to enhance your blog post about more information about the "Why" and explain more what you actually doing?

Thanks!
Dhanasupriya
Active Participant
0 Kudos
Hello Zeis

Thanks for your inputs and I updated.
geetharani31
Explorer
0 Kudos
Hi

I am the beginner for SAP ui5/Fiori, while I am launching Ui5 application from VS, Application is loading from Test folder but when I try to run  the application index.html Page content is not getting loaded.

Please anyone help me on this. for your reference attached screenshot.

Dhanasupriya
Active Participant
0 Kudos
Hello Geetha.. This is not the right place to post your query. Please raise you question at: Ask a Question | SAP Community