D
droid
Guest
If I have a person controller which gets a list of people in the database passes that list to the view as listOfPeople and my view has a combobox defined like so:
<g:select name="somePerson" from="${listOfPeople}" value="${personInstance?.name}" valueMessagePrefix="person.name" noSelection="['': '']"/>
I just want to have a button next to this combobox labelled refresh, which goes back to the database and gets a fresh list of people and put them in the combobox option list and done using ajax because I don't want the rest of the form to refresh, how do I do that?
My main problem is to allow a user to add a person that hasn't been captured in the database. So I was thinking I would provide a button to say add person which opens a dialogbox. on submit and closing of the dialogbox, refresh the combobox and set the new person added as selected.
thanks
<g:select name="somePerson" from="${listOfPeople}" value="${personInstance?.name}" valueMessagePrefix="person.name" noSelection="['': '']"/>
I just want to have a button next to this combobox labelled refresh, which goes back to the database and gets a fresh list of people and put them in the combobox option list and done using ajax because I don't want the rest of the form to refresh, how do I do that?
My main problem is to allow a user to add a person that hasn't been captured in the database. So I was thinking I would provide a button to say add person which opens a dialogbox. on submit and closing of the dialogbox, refresh the combobox and set the new person added as selected.
thanks