[ 
https://issues.apache.org/jira/browse/TRINIDAD-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697459#action_12697459
 ] 

Abhijit S Ghosh commented on TRINIDAD-708:
------------------------------------------

Please also apply the patch to 1.2.11.2.

Thanks,
Abhi

> NullPointerException with multiple XMLMenuModel beans in one page
> -----------------------------------------------------------------
>
>                 Key: TRINIDAD-708
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-708
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.2-core, 1.2.2-core
>         Environment: Trinidad 1.0.3-SNAPSHOT
>            Reporter: Andrew Robinson
>            Priority: Blocker
>         Attachments: xmlMenuModel.patch
>
>
> A page that uses more than one XMLMenuModel beans (two different sources) 
> causes a NullPointerException. There doesn't seem to be any work-around 
> except to not use XMLMenuModel functionality, hence why I reported this as a 
> "Blocker".
> See the forum reference for the details on the problem and how to reproduce 
> it:
> http://www.nabble.com/-Trinidad--Exception-with-XMLMenuModel-usage-tf4432359.html#a12645175
> The problem seems to stem from the fact the code uses a single request 
> variable to store the model. This means that if there are multiple models, 
> only the first one gets stored, and all the rest are thrown out essentially. 
> Suggested fix from what I have seen:
> The root model should be cached per source, not just one instance.
> Current code:
> requestMap.put(_ROOT_MODEL_KEY, this); 
> As you can see, only one instance can ever be created per request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to