This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Implementing MVC framework with different controllers  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got stuck with the application and I was hoping someone could help me. I have a web application using Spring MVC and AngularJS, currently I have everything working as it should. My aim is to have a select method inside trainee table and in the select method retrieve values from another table and save it as a foreign key.

To simplify:

  • We have Table1 and Table2, Table1 has ManyToOne relationship with Table2.
  • The view displays Table1 content
  • When editing Table1 content I would like to see Table2 column (e.g. name)
  • After selecting a column and pressing save, it should update the Table1 foreignkey with selected contents from Table2 primary key.

  • Would anyone help me to develop this? I ran out of options. If it was OneToMany relationship, I could use List, I can't seem to get controllers passing information to each other. I would be very grateful.

    GitHub repository to check the code or even to compile it:
    Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
    ScroogeXHTML 7.2 - RTF to HTML5 / XHTML converter
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!