if you are using inheritance why are you using a border? same effect can be achieved with markup inheritance...
-igor On Wed, Nov 2, 2011 at 11:55 AM, bjolletz <daniel.akerl...@pagero.com> wrote: > > Igor Vaynberg-2 wrote: >> >> extending panel A means that your components go into panel A not into >> one of its children. >> > > Yep. That's why I used setTransparentResolver on the sectionBorder in 1.4 to > make things work. > > > Igor Vaynberg-2 wrote: >> >> you can provide a special addChild() method, or provide >> addChildren(WebMarkupContainer) callback that you call from A's >> onInitialize() or let your panel A implement IComponentResolver and >> try to locate children itself (this is not good for code that depends >> on the actual hierarchy to function). >> >> -igor >> > > My scenario is that all panels that extend panel A should get the same > appearance, which is provided by the border component in panel A. The idea > was that users of Panel B should not have to be aware of any special > methods, they should just use "add" to add components as usual. So if I can > avoid it I would rather not add any special methods. > > I guess my solution will be to replace the border in panel A with the actual > html of the border. It will work even if I lose the reusability I had with > keeping design in the border component. If I understand things correctly, it > is not possible to have a <wicket:child/> element which is not a direct > child to the base panel, without providing some extra methods (or implement > IComponentResolver). I'm not saying this is a bad thing, just trying to > understand how things work now. > > Thank you for your time! > > > On Tue, Nov 1, 2011 at 3:15 PM, bjolletz <daniel.akerlund@> wrote: >> Hi, >> >> I have the following setup: >> >> *A border:* >> >> >> *Panel A* (sectionBorder refers to my border component above) >> >> >> *Panel B* (extends Panel A) >> >> >> When I add the "someLabel" component to Panel B, the component hierarchy >> will be wrong since the someLabel component will be added to the base >> panel >> (Panel A), but in the markup it is really located under the >> "sectionBorder". >> >> In Wicket 1.4 I could solve this by using setTransparentResolver(true) on >> the border. In Wicket 1.5 however, setTransparentResolver seems to have >> been >> removed. Does this mean that the setup in my example is no longer >> possible, >> or is there another way to do it? >> >> I have read the section about borders in the migration guide, but I still >> dont really see how this one could be solved without >> setTransparentResolver. >> >> Any ideas? >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Borders-and-inheritance-in-wicket-1-5-tp3965704p3965704.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Borders-and-inheritance-in-wicket-1-5-tp3965704p3980989.html > Sent from the Users forum 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org