I am on the purpose of swap between some information between players but I don't know what options I do really have and which is better.
Right now I feed my object in the Controller (on a MVC Spring project) and pass it to the view. Here I display info about one player through
<td class="tab-res">
<form:select path="playerHistoric[${player-list}].conqueredLands[${rog.index}].kingdom_name" items="${historic.playerHistoric[player-list].conqueredLands}" itemValue="landName" itemLabel="landName" />
<form:input type="hidden" path="playerHistoric[${player-list}].conqueredLands[${rog.index}].kingdom_ID" />
</td>
<td class="tab-rev">
<form:input path="playerHistoric[${player-list}].conqueredLands[${rog.index}].army" type="number" />
</td>
... and go on...
The variable player-list is the one I am interested in. By default it's set to 0, so I display the info about the first player but I already have in my Model without been showed the info of the other users. The point is that I want to change the info to display clicking on the name of other player(they are listed on a table) so I can update the value of player-list but of course the info remains the same.
One option is to send back to the Controller and reload the page again but I think it's not efficient and not pleasent, so how could I refresh data in my situation?
Thanks a lot in advance. Any idea is helpful