[jira] Commented: (WICKET-627) onBeforeRenderChildren should be made protected

2007-06-10 Thread Alastair Maw (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503201
 ] 

Alastair Maw commented on WICKET-627:
-

Hmmm. We'd still need to have this as a protected method in addition to the 
later RENDER flag set. And walking the entire component tree yet again isn't 
ideal from a performance perspective. :-( We evidently need to have more of a 
think about this.

> onBeforeRenderChildren should be made protected
> ---
>
> Key: WICKET-627
> URL: https://issues.apache.org/jira/browse/WICKET-627
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 1.3.0-beta1
>Reporter: Alastair Maw
>Assignee: Alastair Maw
> Fix For: 1.3.0-beta3
>
>
> I've discussed this with Johan and we think we need to make 
> onBeforeRenderChildren() protected.
>  I have a ValidationTaggedForm extends Form.
>  And in onBeforeRender, I call visitChildren(validationTaggingVisitor)
>  And the validationTaggingVisitor adds a behaviour.
>  If I have a ListView in the Form, onBeforeRender for the Form is 
> called before the ListView populateItem calls.
>  Thus the components added in the ListView aren't visited.
> We can't just swap the order of the calls to onBeforeRender() and 
> onBeforeRenderChildren() in Component#beforeRender() because that will break 
> existing code and the repeaters. Besides, someone will only want to do things 
> the other way around at some later date (e.g. attach a behaviour to a parent 
> using a child then needs to reference/find).
> Suggested solution is to make onBeforeRenderChildren() protected, which will 
> allow as much flexibility as you like.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-627) onBeforeRenderChildren should be made protected

2007-06-08 Thread Johan Compagner (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502893
 ] 

Johan Compagner commented on WICKET-627:


hmm so this just can't be solved that way then
what we could do is set the rendering flag a bit later??
in page.renderPage() itself? with a visitor?
So that first onBefore is called
and if that works completely 
then the rendering flag is set on all.
(this also removes the nasty try{} finally around the beforeRender() call to 
set the flags right again.

> onBeforeRenderChildren should be made protected
> ---
>
> Key: WICKET-627
> URL: https://issues.apache.org/jira/browse/WICKET-627
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 1.3.0-beta1
>Reporter: Alastair Maw
>Assignee: Alastair Maw
> Fix For: 1.3.0-beta2
>
>
> I've discussed this with Johan and we think we need to make 
> onBeforeRenderChildren() protected.
>  I have a ValidationTaggedForm extends Form.
>  And in onBeforeRender, I call visitChildren(validationTaggingVisitor)
>  And the validationTaggingVisitor adds a behaviour.
>  If I have a ListView in the Form, onBeforeRender for the Form is 
> called before the ListView populateItem calls.
>  Thus the components added in the ListView aren't visited.
> We can't just swap the order of the calls to onBeforeRender() and 
> onBeforeRenderChildren() in Component#beforeRender() because that will break 
> existing code and the repeaters. Besides, someone will only want to do things 
> the other way around at some later date (e.g. attach a behaviour to a parent 
> using a child then needs to reference/find).
> Suggested solution is to make onBeforeRenderChildren() protected, which will 
> allow as much flexibility as you like.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-627) onBeforeRenderChildren should be made protected

2007-06-08 Thread Alastair Maw (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502851
 ] 

Alastair Maw commented on WICKET-627:
-

 So, making onBeforeRenderChildren protected doesn't help. :-(
 As I'm wanting to add a behaviour to them somewhere.
 And if I do that in the onBeforeRenderChildren() of my containing Form, 
with an IVisitor, that won't work.
 As onBeforeRender() for all the children has to be called first.
 And that sets the RENDER flag to true.
 So you can't add a behaviour any more.

> onBeforeRenderChildren should be made protected
> ---
>
> Key: WICKET-627
> URL: https://issues.apache.org/jira/browse/WICKET-627
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 1.3.0-beta1
>Reporter: Alastair Maw
>Assignee: Alastair Maw
> Fix For: 1.3.0-beta2
>
>
> I've discussed this with Johan and we think we need to make 
> onBeforeRenderChildren() protected.
>  I have a ValidationTaggedForm extends Form.
>  And in onBeforeRender, I call visitChildren(validationTaggingVisitor)
>  And the validationTaggingVisitor adds a behaviour.
>  If I have a ListView in the Form, onBeforeRender for the Form is 
> called before the ListView populateItem calls.
>  Thus the components added in the ListView aren't visited.
> We can't just swap the order of the calls to onBeforeRender() and 
> onBeforeRenderChildren() in Component#beforeRender() because that will break 
> existing code and the repeaters. Besides, someone will only want to do things 
> the other way around at some later date (e.g. attach a behaviour to a parent 
> using a child then needs to reference/find).
> Suggested solution is to make onBeforeRenderChildren() protected, which will 
> allow as much flexibility as you like.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-627) onBeforeRenderChildren should be made protected

2007-06-07 Thread Alastair Maw (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502448
 ] 

Alastair Maw commented on WICKET-627:
-

Have fixed half of this issue - it's now protected. However, it could do with a 
similar flag check to onBeforeRender() to make sure people have called 
super.onBeforeRenderChildren(), otherwise we'll break MarkupContainers.

> onBeforeRenderChildren should be made protected
> ---
>
> Key: WICKET-627
> URL: https://issues.apache.org/jira/browse/WICKET-627
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 1.3.0-beta1
>Reporter: Alastair Maw
>Assignee: Alastair Maw
> Fix For: 1.3.0-beta2
>
>
> I've discussed this with Johan and we think we need to make 
> onBeforeRenderChildren() protected.
>  I have a ValidationTaggedForm extends Form.
>  And in onBeforeRender, I call visitChildren(validationTaggingVisitor)
>  And the validationTaggingVisitor adds a behaviour.
>  If I have a ListView in the Form, onBeforeRender for the Form is 
> called before the ListView populateItem calls.
>  Thus the components added in the ListView aren't visited.
> We can't just swap the order of the calls to onBeforeRender() and 
> onBeforeRenderChildren() in Component#beforeRender() because that will break 
> existing code and the repeaters. Besides, someone will only want to do things 
> the other way around at some later date (e.g. attach a behaviour to a parent 
> using a child then needs to reference/find).
> Suggested solution is to make onBeforeRenderChildren() protected, which will 
> allow as much flexibility as you like.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.