Doga Ozdemir
Doga Ozdemir

Reputation: 89

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

 <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.

Upvotes: 2

Views: 2816

Answers (2)

Kishor Prakash
Kishor Prakash

Reputation: 8171

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>

Upvotes: 3

dratewka
dratewka

Reputation: 2114

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.

Upvotes: 0

Related Questions