I had a slightly different but somewhat similar issue.
I have a page that had a component that could be rendered with one of two component structures that were both extremely different. One was a simple 'Create' panel and the other was displaying the complex structure of the thing that was created.
Unfortunately the second panel could not be constructed without a valid object (the complex structure) to display but it was not available if it had not yet been constructed and whether it was constructed was based on the user explicitly clicking 'Create' in the create panel.
Initially I thought a page refresh after the user hit Create would do the trick but nope ... it uses the cached version of the page and does not rebuild the component structure for the new complex structure.
I did finally manage to get a page refresh working, generated from within the onClick event handler of the Create button:
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget)
{
Page page = getPage();
setResponsePage(page.getPageClass(), page.getPageParameters());
}
At first I tried:
setResponsePage(getPage());
but this did not work - it kept rerendering from the cache and showed the page without the complex structure's Wicket components
That version of setResponsePage() takes an instance of your page.
The subtle difference to what I used above is to use the page class with parameters instead. This results in a re-rendering of the page and it renders the up to date state i.e. shows the complex structure instead of the 'Create' panel.
I am aware of partial updating available via Wicket models and use that extensively throughout our app but this was a complex case where updating a model was not going to work because I couldn't just make a component visible that was previously hidden because that component can't even be constructed without the creation of the complex object is represents.