I love using managed java beans with xpages, but there is still one scenario, which i couldn't solve yet. I have an application, that shows some entries of a database and allows editing them with an inplace form.
Each form is bind to the back-end document. I want to use a java bean also for that with the ability to bind fields to values in the bean. I know, that i can do something with lists and hashmaps, but that is not the same. Or is it possible, to handle a list of objects from a class? Has someone an idea, how to handle that?

Start by creating a simple
Person.javaPOJO. Something like this:Make sure that every property you want to edit has a getter & setter.
You now have 2 options:
List<Person>and when you edit one, you edit the object directly from that list.Personobject and use that as the binding in the form.Assuming that the instance of the
Personis calledperson, you can bind them to the inputs like:<xp:inputText value="#{person.firstName} />For the save action in the inplace form, I would create a separate
PersonRepoclass with a static save function that consumes the currentPersonobject and saves it to the database:You can then call that from the save button:
PersonRepo.savePerson(person);