struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neelima mahesh <neels_mah...@yahoo.com>
Subject RE: Value Object in a Collection
Date Tue, 28 Jan 2003 21:42:45 GMT

What you thought was right!! .  OrderItemVO  contains getters and setters out of which one
getter is again a Value Object(products) like OrderItemVO. That is where it is causing problem.
If I dont specify the inner loop it is displaying all the properties in products value object,
which I don't need except a few properties to display.
If the products  is a collection then I would have not had any problem, but it is value object
and to apply for "iterate" tag, its looking for collection....but products value object is
not a collection....here is the problem....
 
Any light on this....appreciate your response.
mahesh!
 Mei Zhu <mzhu@goperiscope.com> wrote:Can you send me the definition of your OrderItemVO?
I imagine OrderItemVO
has method getPartNo() and getProducts() to get a list of products which you
want to print out in your inner loop. If that's the case, in your inner
iterate you need to specify property="products". It will help to do one step
a time, try to comment out the inner iterate with , if it works ok
for the outer iterate, that the problem is from the inner iterate.

Mei

-----Original Message-----
From: neelima mahesh [mailto:neels_mahesh@yahoo.com]
Sent: Tuesday, January 28, 2003 3:08 PM
To: Struts Users Mailing List
Subject: RE: Value Object in a Collection



Following is the correct code implementing in my application..Please advice
me...I tried by removing property ...but not working...

property="reqCollection"
indexId="parentIndex"
id="productVO"
type="com.valueobject.OrderItemVO">


indexId="childIndex"
id="prod">







Mei Zhu wrote:If your outer iterate loops through a
collection of java.util.List, in your
inner iterate, you should not specify property attribute.

Mei

-----Original Message-----
From: neelima mahesh [mailto:neels_mahesh@yahoo.com]
Sent: Tuesday, January 28, 2003 2:42 PM
To: struts-user@jakarta.apache.org
Subject: Value Object in a Collection


Hi all,

I'm new to this technology, I wanted to use only iterate tags to
display the information. While iterate a collection in a JSP, need to
display a Value Object's information. Following is the approach i've
followed but in vain.

property="parentProperty"
indexId="parentIndex" //arbitrary name
id="parent" //arbitrary name
type="java.util.List">
property="childProperty"
indexId="childIndex" //arbitrary name
id="child" //arbitrary name
type="valueobjectVO">

// etc.





and i'm getting the following error....

javax.servlet.ServletException: Cannot create iterator for this
collection, stack: javax.servlet.ServletException: Cannot create
iterator for
this collection at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:453)


Thanks in Advance! appreciate any help in this regard.

mahesh.



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail:
For additional commands, e-mail:



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message