java - Iterate through items in a list with richfaces in javascript -


is there way, in richfaces preferably, access java collection object , loop through items in java-script function?

i know richfaces datatables can access property , create rows based on each item in list, can't figure out how replicate same functionality in java-script method.

the reason this, need build array of object literals, each object corresponding item in list.

you can use jstl core library iterate through list:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  <c:foreach var="item" items="${bean.items}">   alert(${item.somefield); </c:foreach> 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -