You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sunil <sm...@neom.com> on 2006/03/21 23:44:37 UTC

how to set ROWS attribute in t:dataTable using Resource Bundle ?

Hi,

I want to limit the No. of Rows that can be displayed in the table by using the
Value from the Resource Bundle (something like below ):

#JSP page
<t:dataTable rows="#{bundle.MaxRecordsDisplayed_PerPage}" >

# Resource bundle File
MaxRecordsDisplayed_PerPage=20

But I am getting a ClassCastException in doing this. I was under the impression
the Expression language does the casting implicitly. ROWS attribute needs an
Integer value but since the value being retrieved from Bundle is as a String,
its causing this Exception :

java.lang.ClassCastException
	at javax.faces.component.UIData.getRows(UIData.java:770)
	at


Is there any other way other than using a getter from the Backing Bean ?

Thanks,
Sunil