On Sun, Nov 8, 2009 at 1:32 AM, suls <[email protected]> wrote: > > Allright. This code does the trick: > > bind("e", xhtml, > "name" -> text("", name = _), > "availableManagers"-> SHtml.multiSelect( > User.findAvailableManagers.map(v => > (v.id.toString, v.email)), > Nil, > _.foreach { id => loadManager(id)}, > "multiple" -> "multiple", > "title" -> "Click to assign managers to this > fund"), > "submit" -> SHtml.submit( "Submit Form" /*button name*/, > processForm /*function to call*/)) > > So what did I change? SHtml.selectObj[User] to SHtml.multiSelect and > also the function executed after submit since a List[String] is now > passed to it. > > Any comments? >
Congratulations on finding the right method! Also, note how, especially in this case, type-safety is your friend and your guide. > > On Nov 8, 3:05 am, suls <[email protected]> wrote: > > Hi, > > > > How can I access all the selected values from aselectbox? I am using > > the following code to generate theselectbox itself: > > > > "availableManagers"-> SHtml.selectObj[User]( > > User.findAvailableManagers.map(v => (v, > > v.email)), > > Empty, > > selected => Log.info(selected), > > "multiple" -> "multiple", > > "title" -> "Click to assign managers to this > > fund") > > > > Is it possible to iterate over all selected options in the selected > > => bit? > > Any pointers how to solve this using different ways? > > > > Cheers, suls > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
