DropDownByKey and DropDownByIndex , LinkToAction and LinkToURL
I want to know the difference between,
1)DropDownByKey and DropDownByIndex
2) LinkToAction and LinkToURL
Thanks in advance
Drop Down by Key would store set of values in key-value pair form. You will need to bind this UI element to a context attribute.
Values are stored and retrieved based on the key passed. We use simpletypes to set and retrieve values from/to this context attribute. It would be efficient when we need only multiple values for only one attribute say country. Then, it can store all the country names along with the code.
Whereas, Drop Down by Index would be helpful when a node has more than one attribute and we only desire to show multiple values for one attribute. You will need to have a context node and then an attribute within to bind this UI element to the node's attribute. Access of elements of the node would be based on index i.e. 0, 1,2,3.... Access of element of the node is easy for the developer. But, in case when the number of entries for drop down is huge, then developer should rather prefer DropDownByKey. Also, this eliminates the duplicate entries with the same key. I mean, if we have a report generated and stored in a node which have attributes like employee names, city, country then probably more than one employee can belong to a country. If then we are trying to get all the countries and using Dropdown by Key, duplicate occurences would be ignored which would not be the case with Drop Down By Index.
Link to Action would trigger an event on click of UI element. So, under this event we can have any sort of custom code within.
On the other hand, Link to URL is for navigation purpose where we supply the url of the target application for navigation on click of it.
You can refer to following link for a better picture.
[UI element Guide|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b06c8c9a-19a4-2b10-d985-9ae7a4383478]
[UI Elements (Book Excerpt from "Inside Web Dynpro for Java")|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/0038f00f-9dfe-2b10-69a4-f1ce24d55d59]
[UI element Guide 1|http://help.sap.com/erp2005_ehp_04/helpdata/EN/9f/656442a1c4de54e10000000a155106/frameset.htm]