cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically get access to UI Element (table) and change property

Former Member
0 Kudos

Hi!

I've created WD application with table UI element. This table is filled with data from an internal table and I need to set number of visible lines in the UI table to number of rows in the internal table.

How can it be done?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Use the visibleRowCount property of the table. Just data bind it to an attribute in your context. Whenever you change the number of rows in the internal table, also update this context attribute with the number of rows.

As a side note, this is generally not a good idea to show too many rows within a table UI element. The scrollbar/paging mechanism of the table are there protect you for very poor performance that might result if too many rows are attempt to be drawn on the screen at once. If you get too many visible rows you will increase the network bandwidth needed as well as the rendering time/memory footprint within the browser.

Former Member
0 Kudos

Thomas, great thanks!

Your solution works perfectly.

I have one more question on WD: is it possible to display arbitrary HTML-code in Web Dynpro applitation?

I want to display some data on the page of WD application but I want to generate HTML myself.

Former Member
0 Kudos

Hi

It is possible change visibleRowCount dynamic? (without binding?)


Thank you

Answers (1)

Answers (1)

Former Member
0 Kudos

Another way for displaying all rows of a table is setting the visibleRowCount property of the WD table to -1.

For your second question in this thread:

Displaying HTML in WDA is not possible. What do you want to achieve?

Regards,

Silke

Former Member
0 Kudos

Silke,

the WD Table control is noticeably slower than simple HTML table.

Another question on WD: is it possible to upload a tab-separated text file from presentation server in a simple manner, like WS_UPLOAD does?

Currently I use FileUpload WD element for this purpose, but it is not as convenient because it provides binary presentation of data in the file.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

In the future, please do not chain multiple unrelated questions together into the same thread.

>the WD Table control is noticeably slower than simple HTML table.

As stated you can't inject your own HTML code. Web Dynpro provides client abstraction and can also run in the NetWeaver Business Client and Flex Client where it isn't even generating HTML.

If you don't want the overhead of the table UI element, then try using just a grid layout or a row repeater. They are closer to the functionality of a simple HTML table.

>Currently I use FileUpload WD element for this purpose, but it is not as convenient because it provides binary presentation of data in the file.

Basically, no. The FileUpload is currently the only way to upload content from the frontend. If you search the forums, you will find previous examples of how to convert the binary string to character (Funciton group SCMS_CONV is my personal favorite) and how to parse tab-delimited content (SPLIT INTO).

Former Member
0 Kudos

Ok, Thomas,

Thanks for advices!