The page starts with two selectManyListBoxes
. The one on the right starts out empty. I then move items to the right with javascript. When I submit the form javascript selects all items in the listBox
on the right before submission. JSF fails validation because there are now items being submitted that weren't originally there.
So my hacky solution is to have a hidden input on the page. Upon form submission have the javascript put all items that are in the right listBox
in that hidden input and deselect all items in both listBoxes
. So, I'm basically hacking past JSF's security feature.
My question: Is there a better/more official/sanctioned way of doing this? I'm sure it's done all the time. Seems like a pretty common feature.