Hey there,

It seems I have a problem with tapestry's internal component IDs when using a loop.

I have component called facetbox. As I have several facets, I need several FacetBoxes:

<ul>
<li type="facetbox" ...></li>
<li type="facetbox" ...></li>
<li type="facetbox" ...></li>
    ....
</ul>

In each facetbox there exists at least one EventLink component which triggers an event in the corresponding facetbox. So far so good, everything works.

But know I'd like to make things more generic. I would like to be able to change my facets easily e.g. by defining a list containing all currently available facets. I use a loop component to create just the facets available:

<ul>
<t:loop source="availableFacets" index="facetIndex">
<li type="facetbox" index="facetIndex" ...></li>
</t:loop>
</ul>

I did not change anything else. Now, my EventLink components inside of the facets won't work correctly anymore.
The EventLinks created in the _first_ example looked like this:

<contextPrefix>/hits.tabs.facetbox:termselect/<contextSuffix>
<contextPrefix>/hits.tabs.facetbox_0:termselect/<contextSuffix>
<contextPrefix>/hits.tabs.facetbox_1:termselect/<contextSuffix>
...

In the _second_ example, the links look like this:

<contextPrefix>/hits.tabs.facetbox:termselect/<contextSuffix>
<contextPrefix>/hits.tabs.facetbox:termselect/<contextSuffix>
<contextPrefix>/hits.tabs.facetbox:termselect/<contextSuffix>
...

You will notice that the internal ID identifying the component is gone. As a consequence, the event "termselect" is always triggered in the first facetbox instead of the one defining the EventLink.

I hope I made my problem clear. I just missed something I guess and would be glad if you could help me out. Thanks a lot for any help!

Best regards,

    Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to