Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Save list in database  RSS feed

 
John Sullivan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!