0 Replies Latest reply on Feb 1, 2008 6:15 PM by pete007

    Creating Drop-Down from Foreign-Key-Constraint with Seam

    Newbie

      Hello,

      I have some table definitions according to the following schema (simplified for better understanding):

      create table department
      (
       id int not null auto_increment,
       name text,
       primary key (id)
      );
      
      create table user
      (
       id int not null auto_increment,
       username text,
       department_id int,
       primary key (id),
       foreign key (department_id) references department(id)
      );
      
      insert into department set name='alpha';
      insert into department set name='beta';
      insert into department set name='gamma';
      


      Then I created a CRUD-application with these commands:

      seam setup
      seam new-project
      seam generate-entities
      seam explode
      


      Started JBoss, and everything works fine. Thanks a lot for this tool!

      Now I need some hints, how to continue programming.

      I am supposed to replace the "Select department"-Button by a drop-down-box containing all names of existing departments. Is there an easy way, to change the application to do this?

      I have several roles, which are all allowed to modify different tables.
      Where can I define Access-Rights for viewing and editing the lists?

      And last one (for now :), where is the equivalent to the Tomcat-Manager in JBoss AS? I especially need the functions undeployment and deploy by war/ear-file-upload.

      I appreciate any help, examples or links.

      Thanks a lot, Peter