return ok(
views.html.event.render(Person.all(), Event.all(), eventForm)
);
I display in the template
first line :
@(persons: List[Person], events: List[Event], eventForm: Form[Event])
a ) the List of events
b) a form for one event to create .
In this form, a select-options list (dropdown) , if possible loaded with the persons collection, as is :
@select(
field = eventForm("person_id"),
options = persons,
args = '_label -> "User:"
)
But i get the compilation error :
type mismatch; found : java.util.List[models.Person] required: Seq[(String, String)]
Any idea
Thanks for your help
Laurent
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/ndUfpG06DzwJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
persons.map(p => p.id -> (p.firstName + " " + p.lastName).toString)
@select(effortForm("timesheetId"),options(timesheets.map(aTimesheet=> aTimesheet.timesheetId.toString -> (aTimesheet.fromDate + " to " + aTimesheet.toDate))),'_label->"Choose Timesheet (*)")
Overloaded method value [apply] cannot be applied to (List[(java.lang.String, java.lang.String)])
I want to see this as result
<option value="1">Sun Apr 08 18:23:32 PDT 2012 to Sun Apr 08 18:23:32 PDT 2012</option>
Please help!