java - Arraylist from class to array in jsp -
i kind of new jsp. have got php experience.
i trying find way store arraylist data retrieved java class file array in jsp.
jsp code:
<c:foreach items="${mybean.status}" var="element"> <c:out value="${element}" /> </c:foreach>
can store output retrieved class file array in jsp?
i looking below. can done jstl?
string []s = new string[count]; for(int i=0;i<=count;i++) { s[i] = element ; }
thanks in advance.
sure can.. can store @ once array.. did code using jstl + spring mvc , got + button (to add rows) , - button delete row (with javascript):
<c:foreach items="${customer.contacts}" varstatus="i"> <tr> <td><form:hidden path="contacts[${i.index}].id" /> <form:input path="contacts[${i.index}].desc" type="text" /></td> <td><form:input path="contacts[${i.index}].number" type="text" /></td> <td><button type="button" class="btnbg2" id="del">-</button></td> </tr> </c:foreach>
anda when submit store list in database
Comments
Post a Comment