handler = new SelectionListFilter(filter, super.contentHandler);
}
// Restore the JavaScript execution context, if any
Scriptable oldScope = null;
FOM_Cocoon cocoon = null;
if (wk.getContinuation() instanceof Continuation) {
oldScope = FOM_JavaScriptFlowHelper.getFOM_FlowScope(objectModel);
Continuation k = (Continuation) wk.getContinuation();
Scriptable kScope = k.getParentScope();
// Register the current scope for scripts indirectly called from this function
FOM_JavaScriptFlowHelper.setFOM_FlowScope(objectModel, kScope);
cocoon = (FOM_Cocoon) kScope.get("cocoon", kScope);
cocoon.pushCallContext(null, null, this.context, wk);
}
try {
if (list instanceof FilterableSelectionList) {
((FilterableSelectionList)list).generateSaxFragment(handler, this.locale, filter);
} else {
list.generateSaxFragment(handler, this.locale);
}
} finally {
if (oldScope != null) {
// Restore it
FOM_JavaScriptFlowHelper.setFOM_FlowScope(objectModel, oldScope);
cocoon.popCallContext();
}
}
super.contentHandler.endPrefixMapping(FormsConstants.INSTANCE_PREFIX);
super.contentHandler.endDocument();