I need to update a model or object immediately after select
a DropDownChoice item.
Bellow is the code that I'm working:
//
---------------------------------------------------------------------------------
add(new ListView[Company]("listCompanies", listData) {
override protected def onBeforeRender() {
//
// ...
super.onBeforeRender()
}
def populateItem(item: ListItem[Company]) = {
var company = item.getModelObject()
//...
val listClients: java.util.List[Client] = clientControler.listClients
item.add(new DropDownChoice("clientSelection", listClients,new
ChoiceRenderer[Client]("name")))
//
---------------------------------------------------------------------------------
In the Listview with properties of Company Object,
after choose a name property of the DropDownChoice, the model
Company would be updated with the Client Name selected.
How can I achieve this?
Thanks