File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes h:dataTable Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "h:dataTable Issue" Watch "h:dataTable Issue" New topic

h:dataTable Issue

Aakash bajoria

Joined: Mar 10, 2008
Posts: 3
I want to display the resule of the below query:
"SELECT p.project_Name
From Bug b,Project p
WHERE b.project_Id=p.project_Id"

-->I am taking the result of the above query in a List and it is coming fine.
-->After that i am trying to displaying it using
<h:dataTable value="{bugDAO.projectList}" var="le">
<hutputText value="#{le.project_Name}"
-->ERROR: PropertyNotFoundException: Error getting property 'project_Name'in bean of type java.lang.String
Praful Sinha

Joined: Jan 25, 2008
Posts: 18
Hi Aakash bajoria,

Dose your DAOclass contain the project_Name propety getter setter method.
and did you configure your DAOclass in faces config file.

Please check it may be you are missing some thing.

Thanks and Regards,
Praful Sinha
Aakash bajoria

Joined: Mar 10, 2008
Posts: 3
i think settings are fine....b'coz
when i am getting the list from the below query:
"SELECT p FROM Project p".....and <h:dataTable> and other things remaining the same;it is going absolutely fine.

But if i just changed the query to--
"SELECT p.project_Name FROM Project p" is throwing the same error I mentioned.

the List is coming fine from the DB..i checked that.
Syed Saifuddin
Ranch Hand

Joined: Sep 01, 2003
Posts: 130

Tell me if the list is coming as an array of string or array of Project

Thank You & Best Regards,

Syed Saifuddin,
Senior Software Engineer

SAP Oracle AIX & Java Training
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1850

problem with getter methods. please make sure that you have properly created the properties.

Krishna Srinivasan
OCAJP 7/8 Exam, 400+ OCPJP Mock Questions
Aakash bajoria

Joined: Mar 10, 2008
Posts: 3
Using "SELECT p FROM Project p", the result is coming in the form of List of Project
But using "SELECT p.project_Name FROM Project p", the result comes as a List of String as it is clear from the Error message , i earlier posted.
I checked the getter and setter methods, they are absolutely fine.
I agree. Here's the link:
subject: h:dataTable Issue
It's not a secret anymore!