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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    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".



    Add 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. */
        public void onActionShowSelectedRowIndices( 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);

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

      Regards, Armin