on 07-13-2006 3:54 AM
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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.