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
Post a Comment