Xpages - How to save values ​​in the list box that was entered by javascript on the client side

advertisements

I have a list box that I am adding and removing items with client side javascript. The issue is that these new values are not being saved to the list box(binded to field). The only value that comes back is the original one that was set in list box. The values are all there on the client since I can loop through the array. How can I get these values to replace the value that is currently there?


By default the listbox have a validator that you may not see during save, (you need to add error controls to see it) and the validator do not accept new values added using CSJS

If you set disableValidators="true" in the listbox control you suppress the validator and the save works fine. you also need to select the entries in the listbox using CSJS before you save,

Credits goes to Jesse Gallagher

Thomas