This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

h:dataTable Issue

 
Aakash bajoria
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Tell me if the list is coming as an array of string or array of Project
 
Krishna Srinivasan
Ranch Hand
Posts: 1862
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
problem with getter methods. please make sure that you have properly created the properties.
 
Aakash bajoria
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic