Populating Drop down with the values from database in play frame work

后端 未结 2 1571
自闭症患者
自闭症患者 2020-12-22 11:44

I am new to play frame work and i am finding it bit difficult. i am retrieving list of client names from data base and populating it to a dropdown ,here is my client.java c

2条回答
  •  眼角桃花
    2020-12-22 11:58

    Yeah, unfortunately Play's templates system is Scala based so you'll have to map over the your @ClientDetails:

    @ClientDetails.map { clientName =>
      
    }
    

    If you return more complex objects it could look more like this:

    @ClientDetails.map { client =>
      
    }
    

    I hope this helps!

提交回复
热议问题