• 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

problem while displaying foreign key data when integrating struts and hibernate

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i am using struts2 integrated with hibernate.i have an itemmaster class with itemuom attribute as foriegn key from UOM master class.
here is my classes.



ITEMMASTER CLASS

UOM

JSP page



ACTION class


controller class


i want to display all the fields of itemmaster in JSP page.....but i am able to display all the fields except item_UOM which is foreign key from UOM .also please note that item_UOM is a join cloumn(no getters and setters in itemmaster)
please give me a solution ASAP
 
Rosu Thomas
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please reply ASAp................................................i need to get the value of my join column(item_UOM). when im using getU() im getting an object as org.Model.UOM@155994c......im not able to convert that into String..........please help me.................................................................thanks in advance
 
Rosu Thomas
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Somebody Please help me......................
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I added Code Tags to your post. That will make it easier to read. Please be patient. We are all volunteers here. In the mean time, you may want to break your problem up into smaller pieces, like a piece of code that retrieves a single record from the database.
 
Rosu Thomas
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rosu Thomas wrote:hi,
here is the modified code as you suggested.......thanks for your reply.....................

i am using struts2 integrated with hibernate.i have an itemmaster class with itemuom attribute as foriegn key from UOM master class.
here is my classes.



ITEMMASTER CLASS

UOM

JSP page



ACTION class


controller class


i want to display all the fields of itemmaster in JSP page.....but i am able to display all the fields except item_UOM which is foreign key from UOM .also please note that item_UOM is a join cloumn(no getters and setters in itemmaster)
please give me a solution ASAP

 
Rosu Thomas
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi.................
i got solution..............
<s:div cssClass="mrc_trdt"><s:property value="u.unit_of_measure"/></s:div>
just call attribute of UOM class using instance of UOM in itemmaster class...................
hope you understood what i meant...........
thanks a lot for helping me.....see you soon..
 
reply
    Bookmark Topic Watch Topic
  • New Topic