Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Cristi Manole
Hello, I've searched the web and I see there are a lot of hits for what I'm looking for but I cannot quite pinpoint the perfect solution (easiest) for this simple thing. What I need is to be able to extend a base page and put into some places some extra panels. I designed the places in the base

Re: Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Gerolf Seitz
you can provide factory methods in your base page like protected abstract Component newHeader(String id, IModel model); in the constructor of base page do: add(newHeader(header, someModelOrNull)); and just override/implement the factory method in your concrete page classes. hth, Gerolf On

Re: Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Johan Compagner
This is planned for the next release (not the genrerics only release if that will be the 1.4) On 3/20/08, Cristi Manole [EMAIL PROTECTED] wrote: Hello, I've searched the web and I see there are a lot of hits for what I'm looking for but I cannot quite pinpoint the perfect solution (easiest)

Re: Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Sebastiaan van Erk
Gerolf Seitz wrote: you can provide factory methods in your base page like protected abstract Component newHeader(String id, IModel model); in the constructor of base page do: add(newHeader(header, someModelOrNull)); and just override/implement the factory method in your concrete page

Re: Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Gerolf Seitz
i agree with you. i had to fight similar problems and came up with similar (ugly) work arounds. let's see how the post-1.4 solution works out ;) Gerolf On Thu, Mar 20, 2008 at 10:12 AM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Gerolf Seitz wrote: you can provide factory methods in your

Re: Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Igor Vaynberg
the workaround is quiet easy class mypage extends webpage { onbeforerender() { if (get(panel1)==null) { add(newPanel1(panel1)); } super.onbeforerender(); } } -igor On Thu, Mar 20, 2008 at 2:12 AM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Gerolf Seitz wrote:

Re: Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Johan Compagner
but is a bit against our coding styles by creating the page in the constructor But i agree that works for now. But multiple childs support would be very nice to have if it is just a simple add on to the current way of doing. But first lets i guess bring out 1.4 generics... (if i counted the votes

Re: Multiple wicket:child/ panels like behaviour

2008-03-20 Thread Sebastiaan van Erk
Yes, Johan told me about that one. :-) But I really think that's quite ugly too... :( I really don't want to add hooks to do something that is just regular initialization of the component hierarchy of the page... And whenever possible I think my other work around is at least more intuitive...