on 09-19-2007 9:59 AM
Hi Colleagues,
I am not able to understand the basic difference between dropdown by key and index.. please tell me , also let me know how to decide what we should use..
Cheers!!!
Vivek
A DropDownByIndex UI element provides the user with a dropdown list box. You cannot select more than one entry from the selection list. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When you select the pushbutton, a list with all possible values is displayed.
A DropDownByKey UI element provides the user with a selection list from which he or she can select no more than one entry. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When you select the pushbutton, a list with all possible values is displayed.
The dropdown list box UI elements do not differ from each other when displayed on the screen. However, the data binding model for the DropDownByKey UI element has a completely different concept
Message was edited by:
Anuj Goyal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a drop down by index, the values are populated from a context attribute in the node itself. You have one attribute in the node that holds the list of values and the dropdown gets populated based on that.
In a dropdown by key, the values are populated as a value set, on the context node info. So if you use this in a table, all the rows will have the same value set. Whereas in a index scenario, the list of values for each row depends on the values bound to the context attribute in that particular row.
Look into the component <b>wdr_test_events</b> that has separate views implementing both types of drop downs, that should clarify things better. Other than the case where you want different values in each row of a table, you should be able to use both the implementations and either one will work fine.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Vivek,
There is no difference in the appearance of the two.However the data binding for the two differs.
This is also usually more efficient than DropDownByIndex..
If you want to create a table with dropdown lists, whereby each table row has the same values in its dropdown list, you should use DropDownByKey
If you want to create a table with dropdown lists, whereby each table row can have different values in its dropdown list, you should use DropDownByIndex.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.