Hmm.. What's preventing this from working is actually a safeguard built into URLLoader, Redirector and technically the whole module framework.
As you know Redirector is designed to redirect the user as soon as it receives a push of fresh data from upstream. However, when autorun initiates the first push on the page, that push is treated differently and Redirector knows to never redirect on those pushes. Autorun pushes for various reasons have to be able to push all the way down through the hierarchy, even past places where "normal" pushes would stop, like at interactive tables and charts and buttons. So this means autoRun pushes very often find themselves touching Redirector modules, where actually redirecting would be a most inconvenient thing. 😃
This is incidentally why you can be pretty liberal in where you put Redirectors, yet never run into a bug where the page loads only to instantly redirect you away.
You could define a customBehavior in your app though to explicitly override this safeguard, and then use that customBehavior for this redirector.
In application.js, add the following:
if (typeof(Sideview)!="undefined") {
Sideview.utils.declareCustomBehavior("triggerHappyRedirector", function(redirectorModule) {
var baseMethodReference = redirectorModule.onContextChange.bind(redirectorModule);
redirectorModule.onContextChange = function() {
this.markPageLoadComplete();
return baseMethodReference();
}
});
}
And then add this param to your Redirector module(s)
<param name="customBehavior">triggerHappyRedirector</param>
It's a pretty simple concept. We have our Redirector actually jump the gone and declare the page load complete the moment it receives it's first set of data, and this will take the safety off, so to speak.
Let me know if it works for you. Apologies if the code has typos that I've missed.
... View more