Drop-Down in Struts 2

后端 未结 2 896
失恋的感觉
失恋的感觉 2021-01-26 12:22

I have a map with key-value pairs. I want to display the key on a drop-down and value to be sent to server for identifying what is selected.

I am using Struts2. I tried

2条回答
  •  死守一世寂寞
    2021-01-26 13:15

    Use listKey and listValue attributes of tag to get properties from list of objects.

    In order to swap keys and values in map put value in listKey and key in listValue.

    
    

提交回复
热议问题