• 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

Primefaces datatable only show last item

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to everyone:

I´m taking my first steps on PrimeFaces. I'm running a dataTable but the page only shows the last item of a list and I have no idea what I'm missing.

NetBeans 6.9
JSF 2.0
Apache Tomcat 6.0
JDK 1.6
primefaces-2.2.M1.jar

My *.xhtml page:


My Bean:



The first problem is the folloing line:


Throws an error: javax.el.ELException: "fn:length" Not Found

When I delete the the page is showed but it prints only the last item of the car list.




 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You car list contains only one element as you are using the same Car object. Instantiate Car object in for loop instead. And for number of your cars, use #{tableBean.carsSmall.length}.

regards,
Nirvan.
reply
    Bookmark Topic Watch Topic
  • New Topic