This content has been marked as final.
Show 1 reply
-
1. Re: NullPointerException in AjaxViewHandler.createView
timleung22 Nov 27, 2007 12:16 PM (in response to timleung22)After chasing the code in the debugger, I found that the cause of the problem is that the "ajaxContext" cannot be resolved from the FacesContext, given the fact that I am using the Spring framework's DelegatingVariableResolver. In AjaxContext.java, there is this code
AjaxContext ajaxContext = (AjaxContext) context.getApplication()
.getVariableResolver().resolveVariable(context,
AJAX_CONTEXT_KEY);
if (null == ajaxContext) {
// TODO Create default implementation.
// ajaxContext = new AjaxContext();
// context.getExternalContext().getRequestMap().put(AJAX_CONTEXT_KEY,
// ajaxContext);
}
return ajaxContext;
now my AJAX_CONTEXT_KEY cannot be resolved, why is the instantiation of ajaxContext commented?
Am I missing anything on the faces-config.xml?