Is there a way I can direct the pagelink component to a zone. I tried using
eventlink and delegate to return the instance of an injected page. This
works but I have dynamic number of pages in a loop for a tab component. I
would just like to specify in the link where the page should be loading.

So ideally I want a pagelink with a target div.

Here is what I tried. Could you please point me in the right direction?

<t:loop source="tabList" value="label" index="tabNum">
        <li class="${active}">
            <t:eventlink context="label" class="no-text-decoration
tapestry-tab-select" zone="tabZone"
                         event="onTabClick">
                ${label}
            </t:eventlink>
        </li>
    </t:loop>
<div class="tab-content">
    <t:zone t:id="tabZone" id="tabZone">
        <t:delegate to="tabMarkup"/>
    </t:zone>
</div>

@InjectPage
private TestPage testPage;

@OnEvent(value = "onTabClick")
void onTabClick(String tabLabel) {
    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(tabZone);
    }
}

public Object getTabMarkup() {
    testPage.onActivate("test");
    return testPage;
}

Thanks,
Charan

Reply via email to