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?
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
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---