* @param pages the collection of pages in scope
* @param call the method to invoke on the pages
*/
private static void call(Collection<?> pages, String call){
ScriptBuffer script = new ScriptBuffer();
script.appendScript(call);
for (Iterator<?> it = pages.iterator(); it.hasNext();){
ScriptSession otherSession = (ScriptSession) it.next();
otherSession.addScript(script);
}
}