Hi All,
I want to display text as 2 lines in a feedback message in a MOBILE APPLICATION.
In a Web App I can use "Line1<br/>Line2" but in a mobile app this does not work.
I have also tried "Line1\r\nLine2" and "Line1" + NewLine() + "Line2" and "Line1
Line2"
But none of these work. Is it possible to display a feedback message with a newline break in a mobile app?
Cheers,
Lester
It just echos the codes (NewLine gets translated to a space). BUT...
I finally discovered how to do this.
The FeedbackMessage API by default performs an EncodeHTML() on the message which is why the <br/> gets displayed instead of producing a new line.
But if you create a Javascript call as shown below and provide a parameter for the EncodeHTML option as FALSE, then you can supply HTML codes in your message including <br/> to force a new line.
This is all documented at:
https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/JavaScript_API/FeedbackMessage
MessageType 0=Info, 1=Success, 2=Warning, 3=Error
I don't know about v10, but on v9 within the RichWidgets espace, the default behaviour can be set via a site property:
Lester,
You are saying "this does not work", but what exactly is the result of using <br> and NewLine()?
Kilian Hekhuis wrote:
Thanks much. I have used this solution and it works!
I mean, in feedback message popup I will have to show the messages stacked in newline. I was using newline() function but it was not working but adding <br> end of the line is working for nme
Thanks for the feedback Lester, that's something I didn't know myself :).