Announcement Announcement Module
Collapse
No announcement yet.
Remove array row jsp Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove array row jsp

    Hello,

    My page is binded with my model attribute which contains a list. It's a validation form for a news.

    When I modify a field text in this form, it works.
    Code:
    			<tr class="standard photo video">
    				<th><fmt:message key="actualite_datepublication" /><em>*</em></th>
    				<td><form:input path="datepublication"
    						cssClass="datetimepicker" size="11" /> <form:errors
    						path="datepublication" cssClass="error" /></td>
    			</tr>
    But, i want to remove row in my array and it doesn't work. Removing theses rows is apply only when the user click on the valid button also i can't use rest method on it. My question is how to do that ?


    I tried
    Code:
    			<tr>
    				<td></td>
    				<td>
    				<table>
    					<!-- Affiche les rebonds des athlètes -->
    					<c:forEach var="a" varStatus="i" items="${actualite.idathleteRefs }">
    						<tr id="rb_athletes">
    							<td><form:input type="hidden" path="idathleteRefs[${i.index}].id" readonly="true" /> ${a.nom } ${a.prenom }</td>
    							<td><button class="btn btn-danger"><i class="icon-trash icon-large" onclick="$(this).closest('tr').remove();"></i></button></td>
    						</tr>
    					</c:forEach>
    		
    				</table>
    				</td>
    			</tr>
    When i submit, my model doesn't catch theses changes... The 'actualite' variable in servlet is still the same

    Thank's,

    Kévin

  • #2
    Anyone can help me please ?

    Comment

    Working...
    X