You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by beyaRecords <uz...@beyarecords.com> on 2005/01/14 08:14:57 UTC

for each statement in fd:javascript

Hi,
I have the following code in my jx file:

	<jx:forEach var="orderitem" items="${neworder.getOrderItems()}">
	<tr>
	  <td 
class="normaltext">${orderitem.getStock().getItemTitle()}</td>	</tr>
	</jx:forEach>

which I want to replicate in my form validation. how would I do a for 
each statement in javascript? What I want to do is:

   	<fd:javascript>
   		var success = true;
   		var titleName = widget.lookupWidget("titleName");

		forEach var="orderitem" items="${neworder.getOrderItems()}"
		  if (${orderitem.getStock().getItemTitle()} == titleName){
			success = false
           }
		}
		.......
   	</fd:javascript>

I hope this is clear?

Uzo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org