• Post Reply Bookmark Topic Watch Topic
  • New Topic

Primefaces css?

 
Mark Dragan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you post your code ?
 
Mark Dragan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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">
<hutputText value="CAR"></hutputText>
</f:facet>
<hutputText value="#{car.name}"></hutputText>
</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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have had similar sounding problems in the past which were
resolved by placing the dataTable in a surrounding putputPanel, so
this might be worth a try.


i found anwser from Primefaces Forum
 
Mark Dragan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply but the problem stays, do you know how can add new line in hutputText, 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 hutputText.
 
mye kency
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to escape the <br/> unless you use escape="false" in hutputText.
 
Mark Dragan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 />
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!