Bugs item #549703, was opened at 2002-04-28 02:23
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=104754&aid=549703&group_id=4754

Category: Tapestry
Group: bug
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Richard Lewis-Shell (rlewisshell)
Assigned to: Howard Lewis Ship (hship)
Summary: Recursive components

Initial Comment:
I'm not sure if recursive components are disallowed or 
not, but trying to use a component from within its own 
jwc gives a StackOverflowError:
java.lang.StackOverflowError
        at java.util.HashMap$HashIterator.
(HashMap.java:718)
        at java.util.HashMap.getHashIterator
(HashMap.java:617)
        at java.util.HashMap.access$000
(HashMap.java:90)
        at java.util.HashMap$1.iterator
(HashMap.java:487)
        at java.util.AbstractCollection.toArray
(AbstractCollection.java:171)
        at 
java.util.Collections$UnmodifiableCollection.toArray
(Collections.java:585)
        at java.util.ArrayList.(ArrayList.java:121)
        at 
com.primix.tapestry.pageload.PageLoader.constructCompon
ent(PageLoader.java:250)
        at 
com.primix.tapestry.pageload.PageLoader.constructCompon
ent(PageLoader.java:286)
        at 
com.primix.tapestry.pageload.PageLoader.constructCompon
ent(PageLoader.java:286)
        at 
com.primix.tapestry.pageload.PageLoader.constructCompon
ent(PageLoader.java:286)
        at 
com.primix.tapestry.pageload.PageLoader.constructCompon
ent(PageLoader.java:286)
...

If doing this sort of thing is not supported, it'd be 
great to get a message to that effect rather than a 
StackOverflowError - but could it be supported 
somehow?  Am trying to display a recursive data 
structure, and a recursive component seemed natural.

----------------------------------------------------------------------

>Comment By: Howard Lewis Ship (hship)
Date: 2002-05-24 15:16

Message:
Logged In: YES 
user_id=26816

I don't know of an easy way to implement this without 
introducing a huge amount of overhead to track how deeply 
recusive render invocations are.

There would have to be a count for each component that was 
incremented as the component started to render, and 
decremented when it stopped, along with check to see if the 
recusion number was too high.

The overhead on this would be enourmous.  

Perhaps you could handle this in your components; you 
could have a render count attribute that gets incremented 
during render and cleared (using PageRenderListener 
interface) at the end of the render.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=104754&aid=549703&group_id=4754

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to