[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1551) The resolution to JBSEAM-1294 has brought out another NPE exception condition.
by Chris Rudd (JIRA)
The resolution to JBSEAM-1294 has brought out another NPE exception condition.
------------------------------------------------------------------------------
Key: JBSEAM-1551
URL: http://jira.jboss.com/jira/browse/JBSEAM-1551
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.3.0.ALPHA
Reporter: Chris Rudd
The the stock JSF converters require that he component parameter of getAsString not be null. The following is a code snipit from Param.getValueFromModel :
converter.getAsString( facesContext, facesContext.getViewRoot(), value );
The code is using the view root as the component, which is null as ExceptionFilter.createFacesContext does not setup an initial UIViewRoot.
I made the following change and it seems to have resolved the problem :
ExceptionFilter.java
private MockFacesContext createFacesContext(HttpServletRequest request, HttpServletResponse response)
{
MockFacesContext ctx = new MockFacesContext( new MockExternalContext(getServletContext(), request, response), new MockApplication() );
ctx.setViewRoot( new UIViewRoot() );
return ctx;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 6 months