on 06-22-2005 7:52 AM
Does anyone have an example of getting the index of the selected row of a DropDownByIndex UI element
Currently we are always getting a value of zero !? Do you know why ?
We currently use coding like this:
<b>public void onActionSelectGemeente(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int index )
{
//@@begin onActionSelectGemeente(ServerEvent)
wdContext.nodeGemEtb_Gem_G0().setLeadSelection(index);</b>
There are two possibilities to get the new selected index:
1. As already said, by asking the node for its lead selection
2. Using event parameter mapping. In this case, you have to add a statement in wdDoModifyView() to map the event parameter "index" of event "onSelect" of the drop-down list to an action event handler parameter.
I would suggest to use case 1. here, it's simpler.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Heymen,
You can get the index of the selected value from the drop-down list using method getleadselection() from the
wdcontext.node<node name>().getLeadselection();
for using this method you have to set singleton property of this node to false. then and then you can get the index value through this method.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Since u r creating a argument ur self in the function and not setting it the value is being shoen as zero.
You have to manually use wdContext.node<name>().getLeadSelection() and get it.. Then u can use the value.. and what are u trying to do with setlead selection?
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In event handler you have necessary element <b>already selected</b>. So just use wdContext.nodeGemEtb_Gem_G0().getLeadSelection().
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
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.