This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Extracting values from JSTL forEach  RSS feed

 
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: 65826
134
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!