parent.addChild( entry );
}
scs = null;
}
StudioPagedResultsControl sprRequestControl = null;
StudioPagedResultsControl sprResponseControl = null;
for ( StudioControl responseControl : search.getResponseControls() )
{
if ( responseControl instanceof StudioPagedResultsControl )
{
sprResponseControl = ( StudioPagedResultsControl ) responseControl;
}
}
for ( StudioControl requestControl : search.getControls() )
{
if ( requestControl instanceof StudioPagedResultsControl )
{
sprRequestControl = ( StudioPagedResultsControl ) requestControl;
}
}
if ( sprRequestControl != null && sprResponseControl != null )
{
if ( sprRequestControl.isScrollMode() )
{
if ( sprRequestControl.getCookie() != null )
{
// create top page search runnable, same as original search
InitializeChildrenRunnable topPageChildrenRunnable = new InitializeChildrenRunnable(
parent, null );
parent.setTopPageChildrenRunnable( topPageChildrenRunnable );
}
if ( sprResponseControl.getCookie() != null )
{
StudioPagedResultsControl newSprc = new StudioPagedResultsControl( sprRequestControl
.getSize(), sprResponseControl.getCookie(), sprRequestControl.isCritical(),
sprRequestControl.isScrollMode() );
InitializeChildrenRunnable nextPageChildrenRunnable = new InitializeChildrenRunnable(
parent, newSprc );
parent.setNextPageChildrenRunnable( nextPageChildrenRunnable );