NullPointerException when submitting Struts <html:select> tag with multiple selection

I've been doing some client-side Javascript with Struts lately and two of my <html:select> tags happen to be a multi-select box(Listbox).

 Let's name them A and B for simplicity. A and B are form properties mapped to an ActionForm class. I transfer all option entries (the <option> tag) from A to B. I was successful doing this through Javascript but then when I click submit, I'm getting a NullPointerException.

Luckily, I found a solution on the internet and the trick was to "emulate" the user action of "Selecting" all the options of B. Here's a link on how to do that.

Published 02-20-2008 9:32 PM by lamia
Filed under: