Pretty Code Blog

Just another weblog about development

16  07 2009

The method getELContext() is undefined for the type FacesContext

Em um projeto JSF estava encontrando a todo momento os erros

The method getELContext() is undefined for the type FacesContext

e

The method getELResolver() is undefined for the type Application

Ainda não encontrei a causa disso, mas consegui resolver.

Eu tinha o código

FacesContext context = FacesContext.getCurrentInstance();
Object relatedController = context.getApplication().getELResolver().getValue(context.getELContext(), null, relatedControllerString);

e troquei por

FacesContext context = FacesContext.getCurrentInstance();
Object relatedController =  context.getApplication().getVariableResolver().resolveVariable(facesContext, "relatedControllerVariable");

Assim que eu entender a causa edito e posto aqui.


Leave a Reply

CAPTCHA Image

« »