aspose file tools*
The moose likes JSF and the fly likes Foreign key field population from datatable to textbox? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Foreign key field population from datatable to textbox?" Watch "Foreign key field population from datatable to textbox?" New topic
Author

Foreign key field population from datatable to textbox?

Aravind M Jay
Greenhorn

Joined: Mar 16, 2006
Posts: 15
Hi,
I'm trying to populate my textbox from a datatable by providing a link on one of the columns of the table.It is all fine and working if the table has columns from one database table.
But my problem comes when there is a foreign key in my datatable and when i click on the link all fields get populated except for the foreign key field..
Could anyone please help me out in solving this???
im posting the code below...CurrencyCode is my foriegn key in this case..



Inside the Action method of the command link im catcthing the value.


"manufacturerEntityBn" is an instance of my entity bean.
"manufacturerDAOBn" is an instance of my DAO class where i have the methods for CRUD operations and that is not required in this case here..


[ March 16, 2006: Message edited by: Tim Holloway ]

[ March 16, 2006: Message edited by: Tim Holloway ]
[ March 16, 2006: Message edited by: Tim Holloway ]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

Aravind,

Welcome to the JavaRanch! But what does the "MJ" stand for?

You didn't do bad for a first post with formatted code, but the UBB software converted your JSF tags to emoticons and the XML ended up stretched halfway to Kenya. The UBB software can be hard on JSF. I've tried to make it a little more readable.

I couldn't tell which item was your foreign key, though. JSF doesn't know about databases, however, so I'd suspect you didn't have a property mapped correctly.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Foreign key field population from datatable to textbox?