Oh yes. Was a good Idea to Handle this. thanks. On Sun, Jan 9, 2022 at 5:25 PM Bergmann Manfred <m...@software-by-mabe.com> wrote:
> Hi. > > I’m not sure this would be a good feature. > I’d imagine it would not be trivial to implement but more importantly it > would lead to complex designs. > > A proper way to handle this is composition. So (just as an example) > instead of two <wicket:child />s you add two <div wicket:id/> and depending > on your need (or your Java subclasses) fill one or the other with an empty > panel. This could probably be done with an abstract base class and two > subclasses which each implement, or add the right panel. > > > Manfred > > > > > Am 09.01.2022 um 14:30 schrieb vahid ghasemi <vahidghasemi...@gmail.com > >: > > > > Yes, > > I want to use a child class in multiple places of parent markup. > > How should I handle that? > > If it does not exist and isn't any way to do that, I think it's a good > > feature for the future. > > > > On Sun, Jan 9, 2022 at 4:34 PM Bergmann Manfred <m...@software-by-mabe.com > > > > wrote: > > > >> Hi. > >> > >> To my knowledge that doesn’t work. > >> This is probably a case to prefer composition over inheritance? > >> > >> > >> Manfred > >> > >> > >>> Am 09.01.2022 um 13:55 schrieb vahid ghasemi < > vahidghasemi...@gmail.com > >>> : > >>> > >>> Hello, > >>> How can I use 2 wicket:child for 1 inherited class? > >>> Like this: > >>> > >>> <h1>Hello</h1> > >>> <wicket:child child-id ="first"> > >>> <h2>Hello</h2> > >>> <wicket:child child-id ="second"> > >>> > >>> > >>> <wicket:extend id="first"> > >>> <h1>Hello again</h1> > >>> <wicket:extend id="second"> > >>> <h2>Hello again</h2> > >> > >> > >> --------------------------------------------------------------------- > >> 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 > >