• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Map based Action Form

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to create a dynamic form on my web app, and thought the map based action form would be my best choice (I am wedded to struts). I will be putting up x amount of properties, some single select, some multiple select. However, when I write my unit tests , I am seeing that struts will not put a String[] into a mapped property - it will only take the first value - here's my test code:



I get a ClassCast Exception on this line:
String[] results = (String[]) resultMap.get("by Service Code");

Any ideas what causes this or how I can build a form that I won't know the properties til runtime ?
reply
    Bookmark Topic Watch Topic
  • New Topic