• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Primefaces css?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you post your code ?
 
Mark Dragan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
<h:outputText value="CAR"></h:outputText>
</f:facet>
<h:outputText value="#{car.name}"></h:outputText>
</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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have had similar sounding problems in the past which were
resolved by placing the dataTable in a surrounding p:outputPanel, so
this might be worth a try.



i found anwser from Primefaces Forum
 
Mark Dragan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply but the problem stays, do you know how can add new line in h:outputText, 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:outputText.
 
mye kency
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll need to escape the <br/> unless you use escape="false" in h:outputText.
 
Mark Dragan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 />
 
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic