Skip to Content
avatar image
Former Member

How to show the content of a table (long text) in a scrollable textbox?

Hi,

I have to say first, many thanks to the ones who answers to threads in this forum, it's very helpfull when we're learning web dynpro!

I have a RFC function that return a table containing a long text (node "it_text", with elements "Tdformat" and "Tdline").

1) I want first to copy all the Tdlines in a new node "text_box" (that I made specially for the screen, it contains only the element "Tdline" [the text itself]);

2) Then I want to show the content of the node "text_box" in a scrollable textbox on the screen (to show 8 lines of text, for example).

How to do that easily? What is the UI Element needed to show that?

Thanks! 😊

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 07, 2007 at 06:50 PM

    Hi,

    Its very easy to do that. You can use <b>TextEdit</b> UI component for that purpose. Map the value property of TextEdit to you custom attribute. You can use various properties to change the visible rows and columns.

    I guess you know the logic to read the text from RFC node and appending it to text_box. Infact you need not to create a node, but you can simply create a Value Attribute and append the RFC data.

    Regards

    Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      This may be what the original poster wanted since it's marked as answered but this will cause every line from the long text table to be on a separate line in TextEdit field.

      When I had a similar situation, my users wanted the formatting to be retained. This meant that I had I had to query the format column to determine if the current long text row was a continuation of the previous line. In that case I didn't append a newline ("\n") character.

      David