Hello all- I'm having an issue when trying to update a many-to-one collection attached to a JPA object in Lift. I'm currently using a SHtml.multiSelect for choosing which objects should be assigned to the many-to-one collection. My bind statement looks like this:
bind("location", xhtml, "id" -> SHtml.hidden(() => locationVar(current)), "name" -> SHtml.text(location.name, location.name = _), "beacons" -> SHtml.multiSelect(choices, default, {bsIds : List [String] => { location.beacons.clear bsIds.map( id => location.beacons.add(Model.getReference(classOf [Beacon], id.toLong) ) ) } } ), "save" -> SHtml.submit(?("Save"), doAdd) ) This works great when I'm adding or removing beacons to my location as long as I don't unselect all options. When I unselect all options, my closure for the multiSelect doesn't get called so the beacons Set doesn't get cleared out. How can I capture when I unselect everything in my multiSelect? Thanks in advance! - Aaron --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---