cancel
Showing results for 
Search instead for 
Did you mean: 

Table Popup menu of NW 2004s

Former Member
0 Kudos

The latest SDN newsletter mentions that the new feature Popup menu is available for Table UI. However, no blog/tutorial talks about how to create it for a table. Searching the API doc / help.sap.com still gives no clue on table's popup menu.

Please help on:

1. How to create a popup menu belongs to a table?

2. How the popup menu's item be related to the row/column/cell that the right-click happens?

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Tony,

Check http://help.sap.com/saphelp_nw2004s/helpdata/en/de/416d42ab7fd142e10000000a1550b0/frameset.htm

<i>In a table, popup menus can be used when a UI element is used as a cell editor and when the UI element can be assigned a popup menu.</i>

Select appropriate cell editor, right click, select "Insert menu".

To get cell and row you can through parameter mapping of OnLeadSelect event (String col - The ID of the selected column. int row - The zero based index of the selected row (i.e. the one the user has just chosen). Note that, depending on the table's selection change behaviour, this might not yet be the data source's current lead selection.This parameter is replaced by the String based "newRowElement" parameter for hierarchical tables where a row cannot be adequately represented by an index, but only by its associated node element. In general, it is deprecated and should be avoided in future development. Declare an action and event handler parameter of type IWDNodeElement (or one of your own element classes) along with a suitable parameter mapping; then the path will be automagically transformed into a node element instance which you can ask for its index.)

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

First of all, thanks for your soon response!

According to your information, does it means that the table's popup menu, acutally, works only on TextView, Image & Links but not for other types of TableCellEditors, such as checkbox, dropdowns or button?

Regards,

Tony

former_member182372
Active Contributor
0 Kudos

That`s right. You can try to play around with different UI elements as cell editors - try to apply menu for them and you will see what you can and what not .

Former Member
0 Kudos

This was a design decision. These static menus are available for the following cell editors: Image, LinkTo{Action,URL}, ProgressIndicator, TextView.

These are not real context menus (will come later). The menu entries must to be defined before the menu is opened.

Armin

Former Member
0 Kudos

Both them are triggered with mouse right-clicking. Then, what's the major difference between the forthcoming "real" context menu & the currently available static popup menu?

Former Member
0 Kudos

Hi,

the forthcoming ContextMenuProvider will be available for every view, together with the ROOTUIELEMENTCONTAINER.

Regards, Heidi

Former Member
0 Kudos

We are looking forwarding to this new amazing feature can come soon.

Tony

Answers (1)

Answers (1)

Former Member
0 Kudos

Tony,

1.) Create a table and bind its dataSource property to the suitabel node.

2.) Insert a column with table cell editor as "TextView" and "CellVariant" as "TablePopinToggleCell".

3.) Create all the other columns (with suitable table cell editors / cell variants as per your need), with proper data binding.

4.) Right click the table and choose "Insert Popin". Select the popin and choose "Insert Content" and select the corresponding UI element, say TextView.

5.) Bind the "text" property of the TextView to the suitable attribute which you wanted to display in the popin.

6.) Similarly you may insert a "TextBar" (right click TablePopin and choose "Insert TextBar") and bind it to the suitable attribute.

Thatz it. Table popin is ready. ;-). You may follow the same steps to insert a popin for a column as well. (Select a column and choose "Insert Popin").

(<b>Note:</b>

By inserting cell variant TablePopinToggleCell into the first column of the table, you can implement opening and closing of a TablePopin. When the user clicks the TablePopinToggleButton, the TablePopin opens below the row; when the user clicks again, it closes.

<b>End of Note:</b>)

<b>Sorry.Ignore my post and follow maksim's solution if you want POPUP rather than POPIN.

</b>

~ Bala

Message was edited by: Bala

Former Member
0 Kudos

Hi Bala,

Thanks for your quick response, though I am, actually, asking for information of table popup menu rather than table popin.

By the way, thanks your helpful information on the usage on table popin.

Regards,

Tony