Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How do you do a "Select All" on the Visible Rows of a Table only?

Hi,

I am currently trying to do a "Select All" functionality on the VISIBLE ROWS only in a table using Web Dynpro Java. Is there anyone who knows how to do this? I was thinking of accessing the Table element found in the View, and checking the visilbe rows but I'm not sure if that is possible.

Would really appreciate anyone's help. Thanks!

replied

Bind the properties "firstVisibleRow" and "visibleRowCount" to context attributes of type "integer". Then in an action handler, you can select the visible "rows" by

int firstVisibleRow = wdContext.currentContextElement().getFirstVisibleRow();
int visibleRowCount = wdContext.currentContextElement().getVisibleRowCount();
for (int i = firstVisibleRow; i < firstVisibleRow + visibleRowCount; ++i)
{
  wdContext.node<TableDataSource>().setSelected(i, true);
}

Armin

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question