Artem Morozov created WICKET-4895:
-------------------------------------
Summary: NullPE: addOrReplace for feedback panel does not clear
Component.FEEDBACK_LIST - feedback from replaced component causes NPE error.
Key: WICKET-4895
URL: https://issues.apache.org/jira/browse/WICKET-4895
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.3.0
Environment: Wicket 6.3.0
Reporter: Artem Morozov
Priority: Critical
Refresh for page, containing feedback panel causes NPE.
I have MarkupContainer wich has overriden
protected void onBeforeRender()
where I call addOrReplace to add or replace component with feedback panel.
I have noticed that refreshing such page causes
Caused by: java.lang.RuntimeException: An error occurred while getting the
model object for Component: [MessageListView [Component id = messages, page =
<No Page>, ...
During dubug Wicket 6.3.0 I see that
Component.beforeRender() method has multiple feedbacks in
getRequestCycle().getMetaData(FEEDBACK_LIST)
insteas of one - witch I've replaced in MarkupContainer.onBeforeRender().
Call to
oldFeedBack.prepareForRender();
before addOrReplace fixes problem, but prepareForRender is not in public API.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira