I Want to create one autocomplete form,

The first field in my form are one document number, so when my user leave the field, I search in my db, and if find any records I automatic complete the others fields

I using beanbind to bind the form with my bean, so after I return the record from my db, I need to input field by field??

I try to only set the bean with my new bean

newPerson = myService.findOne(document.getValue()); this dont works for me, so I try this:

nome.setValue(return.getName()); this.newPerson.setName(return.getName()); but only when I update the field works( the second works but the field are not updated with the bean value)

so How is the best way to do this?


If you have a BeanFieldGroup instance you can try with

beanFieldGroup.setItemDataSource(myService.findOne(document.getValue())) HTH