Skip to Content

DropDownByKey and DropDownByIndex , LinkToAction and LinkToURL

Hi Experts,

I want to know the difference between,

1)DropDownByKey and DropDownByIndex

2) LinkToAction and LinkToURL

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Dec 07, 2009 at 01:35 PM

    Hi Vinay,

    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|]

    [UI Elements (Book Excerpt from "Inside Web Dynpro for Java")|]

    [UI element Guide 1|]


    Tushar Sinha

    Add comment
    10|10000 characters needed characters exceeded