The page has two buttons, one to add transaction and the second to remove transaction.
Add Transaction - moves items from select component 1 to select component 2 Remove Transaction - moves items from select component2 to select component 1
This all works fine but i have a problem when the user clicks on the save changes button. what should happen is that all the items in select box 2 should be saved in the database. How do i access all the items in select box 2 as i understand when the form is submitted only the selected option is sent to the Action/Server.
Yea, only the ids of the selected items get submitted. My elegant solution (or ugly hack) for this was to add some java script on the submit button that selected all the items in the "selected" list. I could try to track down the code if you can't figure it out yourself.
If the select List does not change dynamically in ur Page, you can safely check the condition of Page Submit and use the SelectComponent2 for Database insert which u are originally populating instead of getting it from the Form.