AnsweredAssumed Answered

FacesContext instance is null in webscript

Question asked by jnjp28 on May 26, 2011
Latest reply on May 30, 2011 by daave

i have a problem with the use of FacesConext in a webscript (extends DeclarativeWebScript).
When i try to get an instance of FacesConext i have this error : "FacesContext must no be null"

This is the code :

FacesContext context = FacesContext.getCurrentInstance();
Config config = Application.getConfigService(context).getConfig(node);
ActionsConfigElement actionConfig = (ActionsConfigElement)config.getConfigElement(ActionsConfigElement.CONFIG_ELEMENT_ID);
ActionGroup actionGroup = actionConfig.getActionGroup("template");

Thanks for your replies

Best regards