Problems with SwipeView and NavigationManager

I’m still using the touchkit 2.1.5 because the existed project is developed with vaadin 6.It’s the mobile version.
I want to use the SwipeView in the NavigationManager, but sometimes there will be a problem:

2013-8-16 9:28:27 com.vaadin.terminal.gwt.server.JsonPaintTarget getPaintIdentifier
警告: Painting reference to orphan com.vaadin.addon.touchkit.ui.NavigationView, the component will not be accessible on the client side.

When this problem appears, the swipeview couldn’t be rendered.

Could anyone tell me why?

Yes, I’ve also discovered this issue.
It seems it relates to detaching next/previous components: parent is removed for previous and next component after navigation has been performed. But target navigation component could be one of those next/previous components.
The navigation listener should help:


getManager().addListener(new NavigationListener {
@Override
public void navigate(NavigationEvent event) {
    Component previous = getManager().getPreviousComponent();
    if (previous != null) {
        getManager().addComponent(previous);
    }
    Component next = getManager().getNextComponent();
    if (next != null) {
        getManager().addComponent(next);
    }
}
});