Jeremy Thomerson-5 wrote: > > you need to be adding the components to the form. you're currently adding > them to the page itself. the component hierarchy is thus broken. on your > child page, either do getForm().add(foo) [you'll need to expose a getForm > method that returns the form from the parent page] or else on your parent > page (BaseEditPage), setTransparentResolver(true) on the form and add the > form children to the page then. >
It's working but is far from satisfying... It breaks the encapsulation of the sub-classes (and those of the sub-sub-classes) because they have to know they can't use add() anymore but have to use some addToForm(). Once you have a form somewhere in the hierarchy, trouble begins. Also, you cannot declare the form as a transparent resolver anymore which means that every component, not only form components, need to use that special method. I'm currently trying to find a way to avoid changing all the hundreds of add() calls in my project... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-in-a-base-class-tp1891692p2304644.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org