• 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

How to auto-map MultiSelect listbox values to a POJO field?

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I checked a lot of sources but couldn't get the whole picture of how this is done.

I created a MulitSelect Listbox on a View which I expect to correspond to its relevant POJO's field with data type 'List' e.g. List<Med> meds = new ArrayList<Med>();

In another words, I want it to auto-persist end-users' multi-selected values from the MultiSelect Listbox to a MySQL database table.

I also have a OneToMany mapping association for Patient<->Med (1:M). That didn't work either.

I am not exactly sure how I can achieve this. Any info would be greatly appreciated.

POJO Class: Patient

Patient View: create.jspx


Any info, ideas, suggestions,... will be most appreciated.

Many Thanks...Mimi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic