• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to parameter dataTable with ressource file

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !

I would like to know if it's possible to parameter a dataTable number of rows using a data stored in a ressource file ??

Here is the content of my constantes.properties:
nbLignesTable = 5
libelleLongeurMax = 30
.....

I load this file using
<f:loadBundle basename="test.portal.properties.gdp.constantes" var="constantes"/>

now in my code i have a dataTable

<x ataTable id="liste" value="#{liste}" var="ligne" styleClass="listeElements"headerClass="head" rowClasses="line1,line2" columnClasses="colonneImage, colonneLibelle, colonneDescription"rows="5"rendered="#{liste != null}">

componants here.....

</x ataTable>

I would like to use
..rows="#{constantes.nbLignesTable}" in my dataTable,
but i get an exception with the following reason:
java.lang.String ???

does anyone knows if it's possible to do this ??

thnx
Nicolas
 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you create a managed bean and have it load the bundle. Put some gets in it to retrieve the constant values?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic