jsp - Spring MVC bind property -
i have list box in jsp page getting populated object passed controller side. want choose items , press delete button remove items black list. (update property)
<select name="blacklistselect" id="blacklistselect" > <c:foreach var="entry" items="${blacklist}"> <option value='${entry.id}'>${entry.value}</option> </c:foreach> </select> public class site { int siteid; list<blackword> blacklist; .... ... .. }
how update blacklist
property on server side? how pass object back? how should bind updated list property? please give me tips or code example? thanks!
it not straight forward: can't pass entries of select if post on form. there several ways want:
- the post pass selected items. end code have reconcile list accordingly
- pass remaining select items in select on delete. javascript function have them.
Comments
Post a Comment