Hi guys,

I need some help with the new method IModel#flatMap as I don't completely get the idea behind it. I've got two main questions: - Why "flat" in the name? It sounds a little misleading to me. With Stream is quite clear what flatMap does: it gets new streams out of each element end merge them into an unique stream. But in this case I don't understand what "flat" means. - Looking at the test code I see that the main difference between map and flatMap is that the first creates a read-only model, while the second uses a wrapping model that might be a read/write one. If so wouldn't be better to provide a second map method with a WicketConsumer as additional parameter? Example: Model.of(person).map(Person::getName, Person::setName);

Cheers.

Andrea.

Reply via email to