incubator-adffaces-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer (JIRA)" <adffaces-iss...@incubator.apache.org>
Subject [jira] Resolved: (ADFFACES-342) ChildPropertyTreeModel and SortableModel will throw NPE if used outside of the JSF lifecycle
Date Thu, 28 Dec 2006 21:09:22 GMT
     [ http://issues.apache.org/jira/browse/ADFFACES-342?page=all ]

Adam Winer resolved ADFFACES-342.
---------------------------------

    Resolution: Fixed

Fixed (I think - no testcase, but we now look first for a FacesContext, and if that fails
go to the ApplicationFactory)

> 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

        

Mime
View raw message