Re: Child page with no html

2008-12-11 Thread John Krasnay
On Thu, Dec 11, 2008 at 02:29:04AM -0800, Michael Sparer wrote: > > you could also just request a childId from the super-class, but I think the > above way is more elegant :-) > More elegant, yes, but also more verbose. Pick your poison, I guess. jk

Re: Child page with no html

2008-12-11 Thread James Carman
Sure you can do that, but if there was a method in the class, we could throw some javadocs in there that says something like "this method can be very useful when your component/page's superclass has abstract factory methods in it which need to be used to initialize the component hierarchy" On Thu,

Re: Child page with no html

2008-12-11 Thread Martijn Dashorst
Huh? protected void onBeforeRender() { if(!hasBeenRendered()) { } } On Thu, Dec 11, 2008 at 1:05 PM, James Carman <[EMAIL PROTECTED]> wrote: > When we discussed this before > (http://markmail.org/message/kjpunkvlvh5ofajp#query:wicket%20onbeforefirstrender%20carman+page:1+mid:cwx67dw5f5tgf

Re: Child page with no html

2008-12-11 Thread James Carman
When we discussed this before (http://markmail.org/message/kjpunkvlvh5ofajp#query:wicket%20onbeforefirstrender%20carman+page:1+mid:cwx67dw5f5tgf4vs+state:results), it was thought that we'd have to add a bit flag to account for whether a component had been rendered before or not. So, why don't we a

Re: Child page with no html

2008-12-11 Thread Martijn Dashorst
component#hasBeenRendered() http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/Component.html#hasBeenRendered() Martijn On Thu, Dec 11, 2008 at 12:43 PM, James Carman <[EMAIL PROTECTED]> wrote: > You can always add the components during "first render" rather than at > in

Re: Child page with no html

2008-12-11 Thread James Carman
You can always add the components during "first render" rather than at instantiation time. The problem is that you have to keep some state around to know whether you've been rendered yet or not. On Thu, Dec 11, 2008 at 2:45 AM, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > Yea

Re: Child page with no html

2008-12-11 Thread Michael Sparer
ery by implementing >>> IMarkupResourceStreamProvider on the BasePage to force the template of >>> it's >>> child classes to always use BasePage.html. I'm not sure this is the >>> best >>> way of doing this, does anyone have any comments

Re: Child page with no html

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael
alist @ Jayway DK http://www.jayway.dk +45 2936 7684 ----- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Child page with no html

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael
Yeah, but the other way are a bit cleaner java code wise... And I Scott where heading into modifying a lot of stuff that would bring an over complicated solution to work.. So the trickery would be to edit and a whole bunch of other stuff(probably)IMarkupResourceStreamProvider, instead of fac

Re: Child page with no html

2008-12-10 Thread John Krasnay
eater(SomePanel("c4")); > >> } > >> } > >> > >> Where BasePage will have a method called addToRepeater which just adds > >> the > >> component to the repeater. > >> > >> I see we could do some trickery by implementing >

Re: Child page with no html

2008-12-10 Thread Jeremy Thomerson
You can also do exactly as you mentioned In your base page, have a repeating view (i.e. ListView) that simply loops over a "List childPanels". Then your method addToRepeater(Component component) will add to that list. Should work exactly as you described. What trickery is needed? I gues

Re: Child page with no html

2008-12-10 Thread smackie604
ust adds >> the >> component to the repeater. >> >> I see we could do some trickery by implementing >> IMarkupResourceStreamProvider on the BasePage to force the template of >> it's >> child classes to always use BasePage.html. I'm not sure this is the best >> way of doing this, doe

Re: Child page with no html

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael
Scott, Think inheritance :) Just write a super which has abstract methods that returns components for c1..c4() and thats it.. no need for trickery with IMarkupResourceStreamProvider ... Should I elaborate more? You could also take a look at the wicketstuff accordion thing, it does somethin

Child page with no html

2008-12-10 Thread smackie604
sses to always use BasePage.html. I'm not sure this is the best way of doing this, does anyone have any comments on using this approach? Thanks, Scott -- View this message in context: http://www.nabble.com/Child-page-