You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Pranav Kacholia (JIRA)" <ji...@apache.org> on 2010/08/27 18:05:54 UTC

[jira] Created: (WICKET-3020) onInitialize javadoc should mention heirarchy issues,

onInitialize javadoc should mention heirarchy issues, 
------------------------------------------------------

                 Key: WICKET-3020
                 URL: https://issues.apache.org/jira/browse/WICKET-3020
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4.10
            Reporter: Pranav Kacholia


As far as i can tell, if you have an heirarchy of components, and one of the parents has an add(component) called in its constructor then the timing as to when onInitialize is called, is no longer predictable. It may be that rendering will start before the child component has finished intializing (the constructor has finished being called). 
so if you want a more predictable rendering, (with all the child components being constructed first), you would need the whole heirarchy to use onInitialize and none of the parents should call add(component) in its constructor.
This should be mentioned in the javadoc, or somewhere. 

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


[jira] Resolved: (WICKET-3020) onInitialize javadoc should mention heirarchy issues,

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-3020.
----------------------------------------

      Assignee: Juergen Donnerstag
    Resolution: Invalid

That assumption is wrong. There are no asynchronous processes. onInitialize() gets called from inside add(). Latest when the component or any of children get added to Component with associated markup (Page, Panel, etc.). Thus, latest when Page constructor is done, all Component's onInitialize() has been invoked. The render process does not start before the root component finished the constructor.

> onInitialize javadoc should mention heirarchy issues, 
> ------------------------------------------------------
>
>                 Key: WICKET-3020
>                 URL: https://issues.apache.org/jira/browse/WICKET-3020
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.10
>            Reporter: Pranav Kacholia
>            Assignee: Juergen Donnerstag
>
> As far as i can tell, if you have an heirarchy of components, and one of the parents has an add(component) called in its constructor then the timing as to when onInitialize is called, is no longer predictable. It may be that rendering will start before the child component has finished intializing (the constructor has finished being called). 
> so if you want a more predictable rendering, (with all the child components being constructed first), you would need the whole heirarchy to use onInitialize and none of the parents should call add(component) in its constructor.
> This should be mentioned in the javadoc, or somewhere. 

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