问题
<p:panel id="sports" header="<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