File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Arraylist in bean cant be displayed in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Arraylist in bean cant be displayed in jsp" Watch "Arraylist in bean cant be displayed in jsp" New topic
Author

Arraylist in bean cant be displayed in jsp

jayachandra madopothula
Greenhorn

Joined: Jan 08, 2008
Posts: 4
I have bean with an list property which will returning list of values, i want to display this list values on ep.jsp. can anybody help me. thanks in advance.
Database.java


faces-config.xml


ep.jsp
Dylan Honorez
Greenhorn

Joined: Oct 02, 2006
Posts: 29
I don't think you can access your exposed JSF bean with ${Database}. I think you have to dig deeper in your context if you use ${}

What you CAN use is #{Database}, ofcourse that isn't compatible with the c:forEach tag, but it's what you have the h:datatable tag for.


SCJP - SCWCD
jayachandra madopothula
Greenhorn

Joined: Jan 08, 2008
Posts: 4
I have used h:dataTable and also i used #{Database} but still i didnt find the display of list. please tell where do i do mistake.
Dylan Honorez
Greenhorn

Joined: Oct 02, 2006
Posts: 29
That indeed looks better. Now, what you're facing is probably your temporaryMehod that is not being called, so your list doesn't get values.

Try just giving it some values in the bean constructor to start with, so you know your jsp is allright. From then on, try building your navigation structure because yours doesn't make much sense to me...

Good luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Arraylist in bean cant be displayed in jsp
 
Similar Threads
The requested resource () is not available
inputText tag not working properly
JSF <h:commandButton action> not working
Help. commandButton does not invoke Bean's method.
Providing anchor to columns in a datatable