on 11-07-2017 12:31 AM
The escape character '\n'
and Unicode character \u000a
will only work in JavaScript. However, I'm trying to add a line break in XML view as below. But doesn't work.
<code><u:TimelineItem text="First Line\n Second Line"/>
Note \n
works as expected for Text
control in XML as well.
<code><Text text="First Line\n Second Line"/>
Hi Manjunatha,
in i18n write like below.
textA=A
textB=B
lineFeed = \n
It will work.
<code><Texttext="{i18n>textA} {i18n>lineFeed} {i18n>textB}"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This was a bug in SAPUI5 which was fixed in 1.44.5+. From the change log:
> [FIX] sap.suite.ui.commons.Timeline: Rendering of multiline text improved
For other controls, details, and a demo, see my answer in your other question How to Add a Line Break to Text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this works for me:
<Text text="line line\n line two" />
<c:TimelineItem text="one one one\n two two" />
make sure you declare the namespace for the sap.suite.ui.commons
xmlns:c="sap.suite.ui.commons" in your view declaration
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Sergio,
The namespace declared in my view is sap.suite.ui.commons only. It is surprising to know that it works for you.
However, the workaround for this problem is to bind the text from i18n file.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.