File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem while displaying foreign key data when integrating struts and hibernate

 
Rosu Thomas
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody Please help me......................
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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..
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic