File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes JSF and composite primary key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF and composite primary key" Watch "JSF and composite primary key" New topic

JSF and composite primary key

Don Quixote

Joined: Jul 31, 2011
Posts: 1
Good staff. I created a web application with JAAS authentication. I followed the manual to the letter of Java EE, I created a user table (+login, password) and another group (+group_name, +login). Note that the + symbol represents the primary key. Managed to get JAAS to work, using jdbc realm and Form based authentication.

I generated the CRUD in NetBeans 6.9.1 for the two entities, user and group. It turns out that on page Create.xhtml to user, it appears only two text boxes, one login and one for password. Then I added a combobox that allows select group names defined statically. Thus, the login and password are saved in the user table, and the login name and the group selected in the table group.

It turns out that I am having trouble saving data in the table with composite primary key, which is the group table. Has anyone had this problem?
I agree. Here's the link:
subject: JSF and composite primary key
It's not a secret anymore!