Skip to Content
avatar image
Former Member

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 15, 2008 at 07:37 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 15, 2008 at 08:37 AM

    Hi Armin,

    Got it to work using your suggestion. Thanks a lot!

    Add comment
    10|10000 characters needed characters exceeded