• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Save list in database

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have problems with one project. I have two tables Publisher and SubPublisher(id, publisher_id, name), when i add publisher in that form i have dynamic input fields for subPublishers. I get list of subPublishers and then i need to save them in table subPublisher with id of publisher.

Here is my code:

Publisher




SubPublisher




PublisherRepository



SubPublisherRepository



PublisherResource



SubPublisherResource



PublisherService



PublisherController




PublishersController



PublisherConverter



SubPublisherConverter



publishers-edit.html



Problems are:
1. When i open form for adding new publisher there is no fields for adding subpublishers.
2. If i add manually publisher and subpublisher in database and when i try edit them ther is subpublisher field but they are empty, it doesn't list subpublishers that are in database.
3. In PublisherController i don't know how to setSubPublishers.

It would be great if someone can help me with these problems.
Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic