Skip to Content

Retrieving multiple rows selected from a table

I want to retrieve selected multiple rows from a table and pass it to other views. Does anyone know how to implement this

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 30, 2004 at 11:17 PM

    Hi Vinoo,

    You could use the "selectionmode" property of the Table UI element to select multiple rows from the table.

    Set the value of the property to "multi".

    Cheers,

    Sam

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Vinoo Martin

      You could try a simple example:

      Create a context node "Rows" with a string attribute "Text". Create some node elements in wdDoInit().

      Create an action "ShowSelectedRowIndices" and implement the event handler as follows:

        //@@begin javadoc:onActionShowSelectedRowIndices(ServerEvent)
        /** Declared validating event handler. */
        //@@end
        public void onActionShowSelectedRowIndices(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        {
          //@@begin onActionShowSelectedRowIndices(ServerEvent)
          StringBuffer msg = new StringBuffer("Multi-selected rows:");
          for (int i = 0; i < wdContext.nodeRows().size(); ++i)
          {
            if (wdContext.nodeRows().isMultiSelected(i))
            {
              msg.append(" ").append(i);
            }
          }
          wdComponentAPI.getMessageManager().reportSuccess(msg.toString());
          //@@end
        }
      

      When executing the action (e.g. with a button) you will see the selected indices in the message area.

      Regards, Armin

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.