When present in a list item, will cause the list item to be hidden instead of deleted. The input value is set to true as well.
When present in a list item, will have the inner HTML replaced with the item count.
An element containing one list item template. Only index is replaced as a token and the default is '{index}'.
An element containing list item children. While the example is a list-group, it can be any element with children.
While it is not required, it is recommended to put the list item in a JSP tag file. This way it can be used in both the template and the list and be updated together.
<%@attribute name="index" required="false" type="java.lang.Integer" %>
<%@attribute name="value" required="false" type="java.lang.Object" %>
<c:set var="index" value="${empty index ? '{index}' : index}"/>
<div class="list-group-item">
<c:if test="${not empty value}">
<input type="hidden" name="paramName[${index}].deleted" value="false" data-delete-input>
</c:if>
<div class="d-flex">
<input type="text" class="form-control me-2" name="paramName[${index}].text" value="${value.text}">
<input type="text" class="form-control me-2" name="paramName[${index}].tag" value="${value.tag}">
<button type="button" class="btn btn-outline-danger" data-isp-toggle="remove-item" data-parent=".list-group-item">
<i class="fa-solid fa-trash" title="Delete Item"></i>
</button>
</div>
</div>