This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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

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 "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