ChildPropertyTreeModel and SortableModel will throw NPE if used outside of the
JSF lifecycle
--------------------------------------------------------------------------------------------
Key: ADFFACES-342
URL: http://issues.apache.org/jira/browse/ADFFACES-342
Project: MyFaces ADF-Faces
Issue Type: Bug
Reporter: Adam Winer
Assigned To: Adam Winer
ChildPropertyTreeModel uses PropertyResolver to look at children. All good,
but if you're outside of the JSF lifecycle, the following line is going to
throw a null pointer exception:
FacesContext context = FacesContext.getCurrentInstance();
return
context.getApplication().getPropertyResolver().getValue(parentData, prop);
SortableModel has similar code.
We've just had an internal user attempt to use ChildPropertyTreeModel from a
filter. A little strange, but there's no obvious reason why these classes
should only be useable with a FacesContext active (they don't take FacesContext
anywhere in the API), and the Application can be retrieved from the
ApplicationFactory (albeit more slowly).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira