cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: TypeError: getStock is not a function.
Date Fri, 14 Jan 2005 12:22:30 GMT
Check first if an orderitem has a method getStock().... This error seems to
imply is doesn't ...
But i'll have to admit that it's strange it works in the jx.
In the jx your variable orderitem is automatically an object from the class
OrderItem.... I don't know if you use the correct syntaxis in the
Maybe you'll still need to check if your variable orderitem is from the
correct type of class.

-----Original Message-----
From: beyaRecords [] 
Sent: vrijdag 14 januari 2005 13:06
Subject: TypeError: getStock is not a function.


I'm sure that this is a simple one but it eludes me at the moment. I have 2
identical operations happening both in a jx page as well as a validation

jx page: 

        <jx:forEach var="orderitem" items="${neworder.getOrderItems()}"> 





and in my formvalidation.xml: 


                        for (var orderitem in neworder.getOrderItems()){
<---------- This line is fine. 

                                if (orderitem.getStock().getItemTitle() ==
"abcd") { <----- This line is causing the error. 





The code in the jx page works, but the javascript in the xml file gives the
above mentioned error message. What am I missing here? 



View raw message