aspose file tools*
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
Author

JSF and composite primary key

Don Quixote
Greenhorn

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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSF and composite primary key