Cool. I can see that you now and the links in onBeforeRender().  So is this
the recommended approach for creating extendible components?  What are the
reasons to not to add all child components in this method?


igor.vaynberg wrote:
> 
> fixed in trunk for 1.4, i will fix in 1.3.x later today when i can get
> to my desktop.
> 
> https://issues.apache.org/jira/browse/WICKET-1548
> 
> -igor
> 
> 
> On Thu, Apr 17, 2008 at 3:54 AM, Maurice Marrink <[EMAIL PROTECTED]>
> wrote:
>> PaginNavigation is not setup properly for extending, we are aware of
>>  this and probably will fix it in wicket 1.5. in the meantime you could
>>  try and copy paste the classes into your own project and then modify
>>  them.
>>
>>  Maurice
>>
>>
>>
>>  On Thu, Apr 17, 2008 at 12:14 PM, John Patterson <[EMAIL PROTECTED]>
>> wrote:
>>  >
>>  >
>>  >
>>  >  John Patterson wrote:
>>  >  >
>>  >  > Hi,
>>  >  >
>>  >  > I am extending the PagingNavigatation and need to access some
>> member
>>  >  > variables to create my page links.  Because these links are created
>> in
>>  >  > PagingNavigatation's constructor me subclasses
>> newPagingNavigationLink()
>>  >  > method is called before my subclasses member variables are
>> initialised.  I
>>  >  > realised that this situation must occur quite often when extending
>> any
>>  >  > class that allows subclasses to provide or override any components.
>>  >  >
>>  >  > Does anyone have a nice workaround?
>>  >  >
>>  >  > It seems to me that creating the pages component tree in some kind
>> of
>>  >  > initialisation step would make classes easier to extend.  Or is
>> there
>>  >  > already a method that should be used to do this?
>>  >  >
>>  >  > Thanks,
>>  >  >
>>  >  > John
>>  >  >
>>  >
>>  >  Just to be a bit clearer
>>  >
>>  >  class MySubclass extends WicketBaseclass
>>  >  {
>>  >     MyDomainObject _parameter;
>>  >     MySubclass(String id, MyDomainObject parameter)
>>  >     {
>>  >         super(id);
>>  >         _parameter = parameter;
>>  >     }
>>  >
>>  >     @Override
>>  >     protected Component overrideToCreateCustomComponent()
>>  >     {
>>  >         return new MyCustomisedCompopnent(_parameter.getSomething());
>>  >     }
>>  >  }
>>  >
>>  >  So _parameter will always be null when
>> overrideToCreateCustomComponent() is
>>  >  called from the base class
>>  >  --
>>  >  View this message in context:
>> http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16742891.html
>>  >
>>  >
>>  > Sent from the Wicket - User mailing list archive at Nabble.com.
>>  >
>>  >
>>  >  ---------------------------------------------------------------------
>>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>>  >
>>  >
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Alternative-method-to-initialise-page-tp16742636p16910691.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to