public FacesConfig getStandardFacesConfig(ExternalContext ectx)
{
if (standardFacesConfig == null)
{
FacesConfig sfc = super.getStandardFacesConfig(ectx);
FactoryImpl factory = (FactoryImpl) sfc.getFactories().get(0);
// Override the default vdl factory with a mock one that only load
// facelet views
factory.getViewDeclarationLanguageFactory().set(0,
MockMyFacesViewDeclarationLanguageFactory.class.getName());
standardFacesConfig = sfc;
}
return standardFacesConfig;
}