aspose file tools*
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
JavaRanch » Java Forums » Java » JSF
Bookmark "h:dataTable Issue" Watch "h:dataTable Issue" New topic
Author

h:dataTable Issue

Aakash bajoria
Greenhorn

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">
<h:column>
<hutputText value="#{le.project_Name}"
</h:column>
<h:dataTable>
-->ERROR: PropertyNotFoundException: Error getting property 'project_Name'in bean of type java.lang.String
Praful Sinha
Greenhorn

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
Greenhorn

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"...it 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
Hi,

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
http://www.socialinet.com
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

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


Krishna Srinivasan
Spring Tutorials, OCAJP Mock Questions, 400+ OCPJP Mock Questions
Aakash bajoria
Greenhorn

Joined: Mar 10, 2008
Posts: 3
Hi,
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.
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: h:dataTable Issue