How to add jsf or html tags to p:panel 's header

主宰稳场 提交于 2019-12-12 21:38:34

问题


 <p:panel id="sports" header="&lt;p:inputText id='headerz' value='text of headerz'" toggleable="true" closable="true" >  

this is my code. Page doesnt show p:inputText. on the source code of page i can see the input text with id=headerz but it is greyed.


回答1:


Try This:

<p:panel id="sports" toggleable="true" closable="true" >
    <f:facet name="header">
        <p:inputText id='headerz' value='text of headerz' />
    </f:facet>  
</p:panel>



回答2:


This is because the header attribute is meant for text not for JSF markup. In other words you may use it to give the panel a title, but not to add JSF components.



来源:https://stackoverflow.com/questions/17947065/how-to-add-jsf-or-html-tags-to-ppanel-s-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!