Re: Single inheritence in parts

2010-07-08 Thread James Carman
Right, well put then. :) On Thu, Jul 8, 2010 at 5:41 PM, Igor Vaynberg wrote: > my point was simply that it is trivial to solve, it has a well known > solution, and this is not the only usecase where it applies. you will > need to do your homework no matter which way you go. > > -igor > > On Thu,

Re: Single inheritence in parts

2010-07-08 Thread Igor Vaynberg
my point was simply that it is trivial to solve, it has a well known solution, and this is not the only usecase where it applies. you will need to do your homework no matter which way you go. -igor On Thu, Jul 8, 2010 at 2:35 PM, James Carman wrote: > Right, it's doable, but there's a bit of hom

Re: Single inheritence in parts

2010-07-08 Thread James Carman
Right, it's doable, but there's a bit of homework you have to do to make sure it all works correctly. You have to solve the whole "onFirstRender" problem in a reliable way. Our base page has an overridable onFirstRender() method that subclasses can override if they wish to do this sort of initial

Re: Single inheritence in parts

2010-07-08 Thread Ben Tilford
Use a pre render listener to call your "render" method. The constructor stuff is pretty bad though. If you have the listener look for the @PostConstruct annotation it even looks like its supposed to work that way. imo if multiple markup section inheritance were implemented you would really limit ho

Re: Single inheritence in parts

2010-07-08 Thread Igor Vaynberg
class Page extends Page { abstract Component getPart1(String id); abstract Component getPart2(String id); onBeforeRender() { if (get("part1")==null) { add(getPart1("part1")); } if (get("part2")==null) { add(getPart2("part1")); } }} in 1.5 it would be done like this class Page extends .

Re: Single inheritence in parts

2010-07-08 Thread James Carman
And, this method doesn't really work very well either. You can't reliably call those abstract methods from the superclass' constructor. On Thu, Jul 8, 2010 at 2:47 PM, Chris Colman wrote: >>class Page extends Page { >> >>abstract Component getPart1(); >>abstract Component getPart2(); >>} >>

RE: Single inheritence in parts

2010-07-08 Thread Chris Colman
>class Page extends Page { > >abstract Component getPart1(); >abstract Component getPart2(); >} > > > > > > That's the component based workaround that I mentioned which IMHO isn't really the pure markup OO solution we're proposing. I'm hoping for true markup inheritance that supports mult

Re: Single inheritence in parts

2010-07-08 Thread Ben Tilford
class Page extends Page { abstract Component getPart1(); abstract Component getPart2(); } On Thu, Jul 8, 2010 at 5:49 AM, Chris Colman wrote: > >Search the list for this and you'll find some quite long discussions. > >Basically, it's not going to happen. This would be multiple > i

RE: Single inheritence in parts

2010-07-08 Thread Chris Colman
>Search the list for this and you'll find some quite long discussions. >Basically, it's not going to happen. This would be multiple inheritance, >not single. Hi Jeremy, I hope I don't sound confrontationalist when I say this but this is clearly not a case of multiple inheritance. For this reques

RE: Single inheritence in parts

2010-07-08 Thread Chris Colman
This issue has come up many, many times before: http://www.mail-archive.com/users@wicket.apache.org/msg06381.html http://www.mail-archive.com/wicket-u...@lists.sourceforge.net/msg26247.h tml Unfortunately some people try to convince the group that proposals like the one you have presented here ar

Re: Single inheritence in parts

2010-07-07 Thread Erik van Oosten
Indeed, multiple inheritance is not the correct term in this case. The point is that the parent class' markup may contain multiple places to place components from sub-classes. Regards, Erik. Op 06-07-10 18:03, Arjun Dhar wrote: On a last note; ..am confusedmultiple inheritance gen

Re: Single inheritence in parts

2010-07-07 Thread Erik van Oosten
I must have been listening to the wrong people then. Sorry to continue any false hopes. Too bad; there is only a small sweet spot for markup inheritance, but with this extension it would be very sweet indeed. Thanks for the link Jeremy. Regards, Erik. On 06-07-10 22:08, Jeremy Thomerso

Re: Single inheritence in parts

2010-07-06 Thread Jeremy Thomerson
On Tue, Jul 6, 2010 at 4:38 AM, Erik van Oosten wrote: > Yes, this has been promised many times. And I am looking forward to it :) > > Regards, >Erik. > > > > Op 06-07-10 07:53, Ernesto Reinaldo Barreiro wrote: > >> Hi Jeremy, >> >> Wasn't this on the which list for 1.5? [1] and [2]? >> >> Che

Re: Single inheritence in parts

2010-07-06 Thread Arjun Dhar
cool ..something to look forward to (in response to other posts) FYI I tried panel it requires some code to be written, not very clean. (opposed pure markup based approach) On a last note; ..am confusedmultiple inheritance generally means MANY PARENT, ONE CHILD (child inherits from multiple

Re: Single inheritence in parts

2010-07-06 Thread Erik van Oosten
Yes, this has been promised many times. And I am looking forward to it :) Regards, Erik. Op 06-07-10 07:53, Ernesto Reinaldo Barreiro wrote: Hi Jeremy, Wasn't this on the which list for 1.5? [1] and [2]? Cheers, Ernesto 1-https://cwiki.apache.org/WICKET/wicket-15-wish-list.html#Wicket1

Re: Single inheritence in parts

2010-07-05 Thread Ernesto Reinaldo Barreiro
I meant "wish list". Mornings after a sleepless night are not easy... Ernesto On Tue, Jul 6, 2010 at 7:53 AM, Ernesto Reinaldo Barreiro wrote: > Hi Jeremy, > > Wasn't this on the which list for 1.5? [1] and [2]? > > Cheers, > > Ernesto > > 1-https://cwiki.apache.org/WICKET/wicket-15-wish-list.h

Re: Single inheritence in parts

2010-07-05 Thread Ernesto Reinaldo Barreiro
Hi Jeremy, Wasn't this on the which list for 1.5? [1] and [2]? Cheers, Ernesto 1-https://cwiki.apache.org/WICKET/wicket-15-wish-list.html#Wicket1.5WishList-multiplychild%252Fextendinheritance 2-https://issues.apache.org/jira/browse/WICKET-1134 On Tue, Jul 6, 2010 at 7:37 AM, Jeremy Thomerson

Re: Single inheritence in parts

2010-07-05 Thread Jeremy Thomerson
Search the list for this and you'll find some quite long discussions. Basically, it's not going to happen. This would be multiple inheritance, not single. You can easily use panels to accomplish what you're looking for. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and sp