You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johan Compagner (JIRA)" <ji...@apache.org> on 2008/10/05 21:11:44 UTC

[jira] Closed: (WICKET-1674) Provide a method to initialise a component

     [ https://issues.apache.org/jira/browse/WICKET-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner closed WICKET-1674.
-----------------------------------

    Resolution: Won't Fix

i dont want to introduce yet another hook, we should remove the once we have not add more
it clutters the interface 

If you want that just use your own boolean flag in onBeforeRender that you set to true once

> 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.