• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

problem with struts2 drop down

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a map of type ..
HashMap<String, List<String>>();

key - id1
value - List of value1,value2,value3

key - id2
value - List of value3,value4,value5

I am not sure how to represent them on two drop downs.

first drop should show id1, id2
second drop down should show value1, value2, values3 or value3,value4,value5
depending on what was selected on first drop down..

I am successful to some extent using map.entrySet as the list..

first drop down key
second drop down as value ..

but thats not the exact way i want ..cos on second drop down it shows values as lists [value1, value2, values3 ] [value3,value4,value5] .

any suggestions please ..i wasted almost a day ..already. ..

 
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the doubleselect tag:

Renders two HTML select elements with second one changing displayed values depending on selected entry of first one.

 
M Kethi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried that ...it dint work out ...
 
Joe Ess
Bartender
Posts: 9615
16
Mac OS X Linux Windows
 
M Kethi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay ..

I had the same problem with double select as i did with select ..
i need to find a way to populate the second dropdown with values of the arraylist ( value of the map)
not sure how I can accomplish ..
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic