Provide a method to initialise a component
------------------------------------------

                 Key: WICKET-1674
                 URL: https://issues.apache.org/jira/browse/WICKET-1674
             Project: Wicket
          Issue Type: New Feature
          Components: wicket
    Affects Versions: 1.4-M1
            Reporter: John Patterson


Normally components are initialised in the constructor which does not allow for 
use of factory methods that need to access state.  This problem was present in 
the PagingNavigator.  Problem detailed here:

http://www.nabble.com/Re%3A-Alternative-method-to-initialise-page-p16742891.html

The current solution is to use onBeforeRender() but this is called more than 
once so care need to be taken to not re-add children and super.onBeforeRender 
must be called. 

To ease creating extendable components I think it was decided worth using a 
flag bit:

http://www.nabble.com/Re%3A-Alternative-method-to-initialise-page-p16974678.html

and creating some hook onBeforeFirstRender or onFirstRender or something like 
that.



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

Reply via email to