Skip to Content
avatar image
Former Member

Text in TextView with new line

Under Layout > Element Properties[TextView] > Text

As Is

In order for the data to be approved, the hard copy documents should be submitted to HR Administrator as per HR Business Processs. The request submitted online is valid for 14 calendar days only from request date. Should the hard copy is not received by HR Administrator between 14 calendar days, the request will be expired, and the requestor should send the online request again.

To Be

In order for the data to be approved, the hard copy documents should be submitted to HR Administrator as per HR Business Processs.

The request submitted online is valid for 14 calendar days only from request date. Should the hard copy is not received by HR Administrator between 14 calendar days, the request will be expired, and the requestor should send the online request again.

Q: How to do this? There is no problem if we use HTML because I can add "\n\n" at the of "HR Business Process". But this in TextView. Anyone can help? TQVM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 25, 2011 at 10:35 AM

    Hi,

    At this moment, webdypro doesnt support new line inside the text property of textview.

    You can refer the below link also:

    TextView and new lines

    As of now, you have to use multiple label or textview to acheive this.

    Hope this helps you.

    Regards,

    Jithin

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 25, 2011 at 09:53 AM

    Hi,

    check this forum [thread|Newline in WDTextView;, its not possible in Textview. However, You can use textedit in readonly.

    Regards,

    Anand G

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 25, 2011 at 10:11 AM

    Hi,

    I had once encountered similar issue. I had to display two separate lines using text view and line break was not possible in text view. As there was only two lines,I split the text into two.Each part was bounded to context value attributes and used two text views to display the same. If the text to be displayed is less, you can try out the same thing. In case of new line you can just bind space character to the value attribute. Please let me know if this works.

    Thanks,

    Shifa

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 25, 2011 at 08:38 PM

    >

    > Q: How to do this? There is no problem if we use HTML because I can add "\n\n" at the of "HR Business Process". But this in TextView. Anyone can help? TQVM

    Use the FormattedTextView

    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/51f6dce86e14bce10000000a155369/frameset.htm

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      Try to bind the TextView UIElement property "Text" with a node attribute and set it to the desired text :

      wdContext.currentContextElement.set<Attribute_name>("Line 1\n\n Line");

      Regards,

      ImaneA

  • avatar image
    Former Member
    Nov 29, 2011 at 04:17 AM

    TQVM jithus. problem solved.

    since its not possible in Textview, I create multi textview.

    Edited by: Perwira Osman on Nov 29, 2011 12:17 PM

    Add comment
    10|10000 characters needed characters exceeded