• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • 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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!