on 06-30-2004 10:52 PM
I want to retrieve selected multiple rows from a table and pass it to other views. Does anyone know how to implement this
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.