Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.7
-
None
-
None
Description
The problem occurs when the user wants to access to a .jsp page that includes a <f:subview> tag.
It seems to be a bug on UIComponentClassicTagBase.getViewComponentIds(). It was fixed on 2.0.x branch but not on 1.2.x in this way:
before:
private Map<String,Object> getViewComponentIds()
{
Map<String, Object> requestMap = _facesContext.getExternalContext().getRequestMap();
Map<String, Object> viewComponentIds;
if (_parent == null)
{ // top level _componentInstance viewComponentIds = new HashMap<String,Object>(); requestMap.put(VIEW_IDS, viewComponentIds); }else
{ viewComponentIds = (Map<String, Object>) requestMap.get(VIEW_IDS); } return viewComponentIds;
}
After:
private Map<String, Object> getViewComponentIds()
{
Map<String, Object> requestMap = _facesContext.getExternalContext().getRequestMap();
Map<String, Object> viewComponentIds;
if (_parent == null)
{ // top level _componentInstance viewComponentIds = new HashMap<String, Object>(); requestMap.put(VIEW_IDS, viewComponentIds); } else
{
viewComponentIds = (Map<String, Object>)requestMap.get(VIEW_IDS);
// Check if null, this can happen if someone programatically tries to do an include of a
// JSP fragment. This code will prevent NullPointerException from happening in such cases.
if (viewComponentIds == null)
}
return viewComponentIds;
}