A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
JSF
Author
How to parameter dataTable with ressource file
Nicolas Viollin
Greenhorn
Joined: Apr 13, 2001
Posts: 26
posted
Nov 04, 2005 10:17:00
0
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
Gerardo Tasistro
Ranch Hand
Joined: Feb 08, 2005
Posts: 362
posted
Nov 05, 2005 07:46:00
0
Could you create a managed bean and have it load the bundle. Put some gets in it to retrieve the constant values?
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: How to parameter dataTable with ressource file
Similar Threads
datatable and databases
"bind" property
Dynamic value for verbatim tag
rendering each child t:tree node in seperate column in panel grid
Scrolling problem with JSF
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter