PDA

View Full Version : Problem with list in HTTP Post


mbhatt
06-12-2007, 08:56 PM
Hi,

I have a list component in my form. Now my list gets populated at run time. When I click on form submit, on the server side when I try to get the HTTP request's list parameter, I get only that value in the list which is selected. So if the list contains e.g. a, b & c , and if none of them are selected, I dont get anything on my server side. But if I select suppose 'a', then I get only item a in the list on the server side. Why am I not getting all the items of the list when I do a GET request on the server side?

-Medha

Confused_Cheese
06-13-2007, 12:45 AM
Hey :)

This is a standard thing with all form's, whether in open laszlo or just standard HTML. Browsers only ever post the selected values, rather than all of them... if it posted them all, how would you know which ones were selected?

If you need the list on the resulting page/server and you can't get them (as in the list didn't come from the server), you could try adding them as extra fields to the post request. For example, have a hidden field/input that gets posted with the form which contains all possible values delimited somehow. You then have a full list, and a list of selected values.