on 06-08-2006 1:39 PM
Hi all,
I have a tray with a popup.
Currently I have an eventhandler for every single menuitem.
Is it also possible to provide only a single eventhandler for all of the menuitems and determine the clicked entry with the event??
Tried to use parameter mapping but onAction doesn't provide any parameters... Or am i wrong?!
Additionally, is there a list populated where I can find provided parameters for mapping?!
Thanks in advance for replies.
Bastian
Message was edited by: Bastian Schnorbus
Bastian,
This is possible via parameter mapping.
1. Set same action for every menu item;
2. Add parameter, say "id" of type string to action;
3. In wdDoModifyView write the following:
if (firstTime)
{
IWDMenuActionItem itm;
itm = (IWDMenuActionItem)view.getElementById("<id-of-menu-item>");
itm.mappingOfOnAction.addParameter( "id", itm.getId() );
/* repeat for all items */
}
4. In view handler you now can dispatch by "id" parameter received;
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.