| Author |
Primefaces css?
|
Mark Dragan
Greenhorn
Joined: Sep 28, 2010
Posts: 18
|
|
Hi everyone,
I have problem with primafaces control: I placed datatable inside panel that has property rendered set to false and according to user action panel rendered is set to true
and the problem is that the datable inside panel won't show pagination???
Thanks in advance
|
 |
mye kency
Greenhorn
Joined: May 09, 2010
Posts: 14
|
|
|
can you post your code ?
|
 |
Mark Dragan
Greenhorn
Joined: Sep 28, 2010
Posts: 18
|
|
Hi, this is code:
<h:panelGrid binding="#{backingBean.grid}" rendered="false" >
<p:dataTable value="#{backingBean.cars}" binding="#{backingBean.datable}" var="car"
paginator="true" rows="10" paginatorAlwaysVisible="false"
paginatorTemplate=" {PageLinks} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15>
<p:column>
<f:facet name="header">
<h utputText value="CAR"></h utputText>
</f:facet>
<h utputText value="#{car.name}"></h utputText>
</p:column>
</p:dataTable>
</h:panelGrid>
When use click on some button I set panelGrid rendered=true and datable inside panel grid lose its css, for example there is no more paginator, there are no more gridlines.
Thanks for help
|
 |
mye kency
Greenhorn
Joined: May 09, 2010
Posts: 14
|
|
I have had similar sounding problems in the past which were
resolved by placing the dataTable in a surrounding p  utputPanel, so
this might be worth a try.
i found anwser from Primefaces Forum
|
 |
Mark Dragan
Greenhorn
Joined: Sep 28, 2010
Posts: 18
|
|
Thanks for reply but the problem stays, do you know how can add new line in h utputText, I'm using xhtml and I have to get the text from the database, text contains \n sign for new line but I can't write it to h utputText.
|
 |
mye kency
Greenhorn
Joined: May 09, 2010
Posts: 14
|
|
try <br/> for it, in database text contain \n and display on xhtml, they ignore it try use HTML tag for this
Good luck
|
 |
Brendan Healey
Ranch Hand
Joined: May 12, 2009
Posts: 218
|
|
You'll need to escape the <br/> unless you use escape="false" in h utputText.
|
 |
Mark Dragan
Greenhorn
Joined: Sep 28, 2010
Posts: 18
|
|
|
Hi, thanks for reply but I'm using xhtml and when I use <br> tag inside output text I get error: You cannot use < tag inside... but I found solutio and this is it if someone needs <br />
|
 |
 |
|
|
subject: Primefaces css?
|
|
|