java - Iterating through ArrayList in JSP in Spring using foreach -


I have the following code to run again via the arrayList:

  Lt; Form: for every item = "$ {list}" var = "list" & gt; & Lt; TR & gt; & Lt; Td> & Lt; C: Out value = "$ {list}" /> gt; & Lt; Td> & Lt; / TR & gt; & Lt; / Form: foreach & gt;  

Now, my code is running through the list, but instead of printing one by one as shown below, printing all the values ​​once:

How do I work to print them line by line? Can i do

Try it:

  & lt; C: forEach items = "$ {list}" var = "list number" varStatus = "list status" & gt; & Lt; C: If test = "$ {listStatus.index  & Lt; C: out value = "$ {listNumber}" /> gt; & Lt; Td> & Lt; / TR & gt; & Lt; / C: If & gt; & Lt; / C: foreach & gt;  

When you specify var as a list and access it in C: it does not select the entire list in every element in the list. To restrict display on N values, you must specify the number in the code above.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -