On Mon, Mar 11, 2013 at 4:40 PM, Andrea Del Bene <[email protected]>wrote:

> + 1 to deprecate it. But it actually seems to call both onBeforeRender and
> onInitialize of the target component.


with the fix for WICKET-4792 it started to call #onInitialize()


>
>  Hi,
>>
>> I'd like to ask you for your opinion about
>> deprecating org.apache.wicket.util.tester.**BaseWicketTester#**
>> startComponent(Component)
>> method in Wicket 6.
>>
>> Initially this method has been introduced to test a component without
>> attaching it to a page (this is what its Javadoc states).
>>
>> First it appeared that the tested component is not initialized (
>> https://issues.apache.org/**jira/browse/WICKET-4792<https://issues.apache.org/jira/browse/WICKET-4792>
>> ).
>> Then 
>> https://issues.apache.org/**jira/browse/WICKET-4976<https://issues.apache.org/jira/browse/WICKET-4976>-
>>  the request cycle
>> and the component itself are not detached at the end.
>> And now a colleague of mine reported me that since WICKET-4976 a test is
>> failing in our app because our custom IRequestCycleListener#**
>> onEndRequest()
>> is called but #onBeginRequest() hasn't been called before that. I remember
>> Hielke from Topicus also had this problem for Wiquery 6.6.0.
>>
>> I suggested to my colleague to use #startComponentInPage(**Component)
>> instead
>> because it has a proper life cycle.
>>
>> I think #startComponent() has to be removed in Wicket.next and
>> #startComponentInPage(**Component) to be the replacement.
>>
>> Any objections to mark it deprecated for 6.7.0 ?
>>
>>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to