• Post Reply Bookmark Topic Watch Topic
  • New Topic

Extracting values from JSTL forEach

 
Amit Malhotra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a situation in which I need to populate a javascript array with certain values. This array will then be the input to an Ajax (Dojo) table model. I'm having trouble figuring out how I can populate this array. What I would want is:

var a = new Array();

<core:forEach items="${companies}" var="company">
//populate my array with company.id, company.symbol, and company.name
</core:forEach>

I've tried several options to obtain company.symbol etc and put them into my array (or any javascript variable), but nothing seems to work.

Any suggestions?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but nothing seems to work.


This is not a useful description of the error.

Do the elements in the array have the appropriate property accessors defined?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!