Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Display Tag Probs using Struts with Hibernate?

 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi this is edward.

I am using Hibernate with Struts. And I also using DisplayTags for Display sorting and pagination.

My Doubt is what is the difference between
Query and CreateSQLQuery in Hibernate
Using this query 1.Query query = session.CreateQuery("from AuditFinding") , Using Dispaly Tags I have done Sorting, and Pagination Using the Query list.
But Using the below Query

2.SQLQuery query = session.createSQLQuery("select id,shipname,shipcode,fromdate,todate,auditfindingstitle,status,assignedto,priority,updatedby,updateddate from Auditfinding af");,
I was not able to Sorting and Pagination.

Using CreateSQLQuery in hibernate, here all the values are stored in object format.
How can i sort and pagination using displaytags.

Could You tell me what is the problem is.
Thank You
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!