i already have some comments about that somewhere
where i said this can be done this way but getModel() isn't final.....
where was it
ahh yes in initModel() (i don't do getModel anymore but test directly on
parent.model)
so +1 for final
johan
On 4/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
dont know why this isnt final, but it seems like it would be pretty
dangerous to override.
mycomponent { imodel getmodel() { return new Model("foo"); }} is probably
a
very likely usecase, the tricky part is that the returned model is not
linked to anything, so it will not be detached.
the way getmodel() interacts with component.model, initmodel(), detach(),
etc - it doesnt look like a very good idea to have this overridible. if
users want to do something funky i think component.initmodel() in
conjunction with component.wrap(imodel) should be more then enough - and
these work better because no matter what you return from those they do
assign that to component.model so the state is consistent.
wdyt?
-igor