how to use more than one @modelattribute on spring -


public modelandview saveemployee(@modelattribute("command") employeebean employeebean,user user bindingresult result)

i want add 2 model attributes 1 related store emoloyee information , 1 storing user login emloyee,accoring program don't want make relationship employee , user table due restriction on project,please me out,how can use 2 model attributes

you can pass in model argument method refer add more 1 attribute.

like this:

public modelandview saveemployee(@model model, employeebean employeebean,     user user bindingresult result) {     model.addattribute("user", new user());     model.addattribute("employeebean", new employeebean()); } 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -