Actually, I don't think I need to know the answer to the previous.
I'm not sure exactly how your implementing your editors but I tend to
use nested controllers and then delegate the responsibility for
tracking dirty to them (they typically use an internal
BeanModelProvider as required).
* I'd give my ProjectEntryEditor a `ValueModel<Boolean> dirty()`
method (that most likely delegates to an internal
BeanModelProvider<ProjectEntry> dirty model).
* I'd have a ProjectEntriesEditor (or controller depending on what
you're calling things) that also has a `dirty()` model. Internallly
I'd use a ReductingValueModel for this that uses an Or function build
from the list of `projectEntryEditor.dirty()`. i.e. when ever an
editor is added or removed it's `dirty()` model is added/removed from
the ReducingValueModel.
* From here I'd the dirty would be an Or of your existing dirty and
the projectEntriesEditor.dirty().
There's definitely scope for improvement with pectin here, and I'm in
the process of thinking about a standard set controllers for this kind
of thing (there's a very brief blurb about this in the future
directions wiki page). I've also started pondering a Bindgen style
approach to generating models from beans which may prove to be more
flexible and allow type safe graphs with automatic nested dirty
tracking... but that's a fair way off unless someone want's to have a
crack at it themselves.
In the end though the controller approach is a lot more flexible since
it lets you layer additional functionality (like validation etc) as
your project requires instead of having BeanModelProvider do
everything for everybody.
Cheers
Andrew