Home populate a dropdown in grails
Reply: 0

populate a dropdown in grails

user924
1#
user924 Published in June 19, 2018, 2:25 pm

i have a user that i give a role to it, and i want when i create the user, to show the roles in a dropdown, then i can select the role that i want to give to him, how can i do it ?? please i really need help in it, cause im new in grails here is the user.groovy

class User {

transient securiteService

String username
String password
String nom
String prenom
String email
String tel

static hasMany = [roles : Role]

static constraints = {
    username blank: false, unique: true
    password blank: false,display: false
    nom nullable: true
    prenom nullable: true
    email email:true, nullable:true
    tel nullable:true, maxSize:20,  matches:/[\+]{0,1}[0-9\s]{3,15}/
}

static mapping = {
    password column: '`password`'
    sort nom: "asc"
    affectations sort : "dateAffectation", order:"desc"
    intervention sort : "responsable", order:"desc"
}
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.324163 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO