We got a requirement in our project to add a panel with some configuration (like header, collapsed) dynamically using prime faces 5.0. We went ahead with bellow code to implement this.
Implementation with problem

Property Not Found Exception

As soon as we wrote this code it started giving us javax.el.PropertyNotFoundException: index.xhtml @33,55 collapsed="#{comp.collapsed}": Target Unreachable, identifier 'comp' resolved to null.
Exception Trace

Solution

After couple of investigation using Google and Forums, there is no luck to find proper solution for this problem. Another surprising piece in this code is #{comp.name} resolves properly in the header section. As we could not find any solution I went ahead and wrote an hack to solve this problem.
Implementation with hack using JSTL
This solution is a hack using JSTL, once I come up with proper solution will write back.