• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

retrieving primarykey based on another field from the database for populating a tree structure.

 
Ranch Hand
Posts: 114
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a JSP where in I populate a tree structure by retrieving values from the database. I also have a search option(text-box and a submit button) wherein I type a search criteria. When ever I search for something I want to make the search criteria as the root and populate the tree structure accordingly. For this I have to retrieve the primary key of the search criteria. How do I go about doing this? To retrieve the search criteria i have used request.getParameter("searchCriteria"). I am using Javascript to populate the tree structure and I am using JSONObject to get the id, parentid and the title fields from the database.The tree structure is populated using the title field. id field is the primary key in my database.

Thank you.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic