I think what you have to do to get all the items selected in the multi select list is to pass the select item itself to the method, then iterate over all the items, check to see if it is selected and if it is do what is appropriate.
dela cruz juan
Joined: Nov 21, 2012
Steve Luke wrote:I think what you have to do to get all the items selected in the multi select list is to pass the select item itself to the method, then iterate over all the items, check to see if it is selected and if it is do what is appropriate.
can you help me with these actually I only copied this code from some sites and did some research on understanding the java as well, going to my problem, the code really validates on what I choose on the selection boxes, the only only thing is the last selection box :
when I choose multiple items it didn't validate all, only one.
you can also try it
<Math> - <basic_math> - <addition> +<2 items>
Please don't add really long lines to your code tags, it breaks the format...
understanding the java as well
As mentioned, you have to pass the select object or the list of options in the Select. Then iterate over each option, check if it is selected, and if it is do the work. See this page on W3Schools for methods available on the Select object, and this page for those available on the Option objects.