On 3/28/07, Jonathan Locke <[EMAIL PROTECTED]> wrote:



I need access to the getRootModel(IModel) method in my code because I'm
writing an instrospective form component validator which needs to know
what
type the compound model is at attach time.  Can we make this method
protected instead of private?  (I haven't got commit access still...
hopefully someone at Apache will rescue me soon).


It could be protected if you like. (maybe final then?)
But it is a very simple method that you can implement very easy in your
validator self ofcourse.
(then you also don't have a back call to component)


BTW, it's a bummer that the new arrangement of things requires a wrapper
for
all the compound property model accessing children.  The whole point of
compound property models in the first place was to do dynamic lookup and
avoid the overhead of associating a model with most form children at all.
Is there no way around this?  (expect answer is no)


No not really, generics and the previous compound don't really work together
correctly
and then we need the Component param back in the normal model which is ugly
and for the compound param very ambiguous what to put in it.
currently
component.getModelObject() is always component.getModel().getObject()

which wasn't the case before (thats why generics didn't work)

compound was also there so that it did save a lot of programming.
ofcourse it had the benefit that it saved memory which we now fill up by
making
a thin wrapper that has 2 references. Its a pity but i dont see another
choice
Ofcourse there aren't really many things created because how many
(form)components
will one compound form have?

johan

Reply via email to