hashmap - Spring mvc form:select path is custom map in model attribute -


how bind map property of model , send selected value controller?

i able populate drop down on submitting form getting error 400 - bad request.

mymodel.java:

public class mymodel{     private map<mysubmodel, string> submodel = new hashmap<mysubmodel, string>();     private submodel submodelsearched; } 

submodel.java:

public class submodel{     public string id;     public string name; } 

jsp:

<form:form action="/mysearch" modelattribute="mymodel" method="post">     <form:select path="submodelsearched">         <form:options items="${mymodel.submodel}/>     </form:select> ..... </form:form> 


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -