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
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,
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
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
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
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
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
alist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
-----
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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
>
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
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
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
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-
14 matches
Mail list logo