on 04-29-2011 6:27 AM
Hi,
I have a requirement where I have to populate dropdown_by_key2 values on selecion of value of dropdown_by_key1.
Hence in componentcontroller context i created a node as subnode of another node. Now i am trying to use supply function in my child node to populate dropdown_by_key_2.
Could I have the code for supply function? I am not able to populate this.
Also is my design if parent child node relation correct? and should the code be written in supply function of child?
Regards,
Vishal Bhatia
First, you have to use DropDownByIndex for this scenario.
You can implement the supply function like
Context:
+ ItemsOfFirstList (node, card=0:n, selection=0:1)
+ text (string)
+ ItemsOfSecondList (node, card=0:n, selection=0:1, supplyFunction=supplyItemsOfSecondList, singleton=true)
+ text (string)
void supplyItemsOfSecondList(IItemsOfFirstListElement parentElement, IItemsOfSecondListNode node)
{
if (parentElement.getText().equals("some_value"))
{
/* add elements to node depending on some_value */
}
else ...
}
Bind the "texts" properties of each drop-down list to the "text" attribute of the corresponding context node.
Additionally, assign an action to the "onSelect" event of the first drop-down list such that a server roundtrip occurs when a value is selected. This server roundtrip will trigger a call to the supply function of the second list because the lead-selection of the first context node was changed by selecting an entry in the first drop-down list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am looking for Webdynpro ABAP solution not java.
However thanks, I succeded with drop down by index, however i need to understand what u mentioned,
Additionally, assign an action to the "onSelect" event of the first drop-down list such that a server roundtrip occurs when a value is selected. This server roundtrip will trigger a call to the supply function of the second list because the lead-selection of the first context node was changed by selecting an entry in the first drop-down list.
How do i do this server round trip mentioned? What is the action i should assign and what is the code i need to write in that action, keep in mind i need webdynpro for abap solution?
Edited by: Vishal Bhatia on Apr 29, 2011 6:41 PM
User | Count |
---|---|
90 | |
23 | |
11 | |
9 | |
9 | |
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.