I have a component that is rendered in java code. The main part has a loop that renders a DirectLink on each iteration.
I obtain the DirectLink by injection, and want to set its body and then render it. I tried getting the DirectLink, then calling addBody to set its body, and then rendering. What I found was that the same DirectLink component was being returned because its body was the accumulated body from all previous iterations of my loop. It was kind of cool looking but wrong. Is there a way to clear the body, or alternatively, to get a different DirectLink each time? Thanks in advance.
