Jun 2nd, 2012, 05:47 PM
AddAllAttributes method spring mvc
I have two lists
List<User> list_of_users=new ArrayList<User>();
List<String> list_of_attributes=new ArrayList<String>();
When i try to use the following lines of code:
I realise that it keeps only the second list (list_of_attributes) and the first deleted. I was wondering how to keep both of these two lists in the model.Is this possible to be happened?Is the AddAllAttributes method what i need?If yes can anyone explain me how the AddAllAttributes method is working.I look at the spring mvc documentation but i didn't really understand.
Jun 3rd, 2012, 02:19 AM
No it won't help you. You cannot store different collections under the same name, unless you first store them with different keys in a map but else you cannot... The Model is basically a glorified Map nothing more/nothing less.
Tags for this Thread