Hallo Yael,
you usually don't need to - what do you mean by "after rendering" -
If I get this right, you are trying to access a component which is inside a loop from a component / method which is performed after the loop is ended? I still can't figure out what is bothering you or what you are trying to achieve,
Cheers,
Ron


yamsterdamer wrote:
The problem is not creating the page in the first time - that goes smoothly.

Let me give you a more detailed description of the problem: I have a contrib 
table within my costume component. The link used to sort the table includes 
reference to the containing component using its id. But since the id is the 
same for all the appearances of the component created by the loop, I think 
what's happening is that tapestry goes to the html line that created the 
component and tries to re-create it using the value/index of the loop.
And those are null, of course, after rendering the loop.
The question is how can I instantiate a new component with a new Id in every 
iteration and save it with its parameters for later use (after rendering)?


Yael.

Ron Piterman wrote:

hallo yael,
I could not quite figure what the problem is -
what are you trying to achieve?
basically you should use components binding inside a For loop to make each component render otherwise. In the For, you use the value and index parameter bindings to set the current iteration value/index to your page/component properties. Then, in the components inside the For, you use those values (the value/index properties) to configure each component differently.
Cheers,
Ron

PS - why use the forum when you have a great mailing list ?

yamsterdamer wrote:


Hi. I'm using T4, and in some of my pages I create components within a loop.

From what I have seen, seems like tapestry re-initializes the instance of the component with different parameters in each iteration, instead of instantiating a new component.

For example, looking at the component hierarchy on the run, I see that tapestry components like If, Insert etc are instantiated more than one time, getting ids like If_0, If_1. How can I do the same with mine? (again, within a loop!) The ultimate goal is to allow each component to keep its own parameters, in order to use them later on re-render. However, even a way of getting an indication to which component (index? Id? Location?) is being re-rendered will do for now… Thanks a lot, Yael.



Sorry for the double posting, I really need help on this...





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-------------------- m2f --------------------

Sent from www.TapestryForums.com

Read this topic online here: <<topic_link>>

http://www.tapestryforums.com/viewtopic.php?p=13308#13308

-------------------- m2f --------------------





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to