> my recommendation is having a component instead of a > page for each tab >
That was my first solution for this. It just seemed a little odd to have non-reusable pages in the components directory. But we can live with that. Just so I'm not misunderstanding anything, there is no correct way to render pages through AJAX. Or to put them in a block like we do components. Out of curiosity, is there a reason for this? I guess I don't really understand what the difference is in rendering components vs pages. And thank you for the answer. I appreciate it. Charan. On Thu, Apr 30, 2020 at 6:18 PM Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Hello! > > I'm afraid I don't understand the desired scenario here. PageLink is for > full page requests, not for AJAX (including Zones). If you really want to > keep the webapp strucutred that way (i.e. each tab is a page), you'd be > better served with iframes. > > On the other hand, my recommendation is having a component instead of a > page for each tab. Also, you could reuse these components in pages if you > need or want that. > > On Mon, Apr 27, 2020 at 5:03 PM Charan Lingamgunta <charan2k...@gmail.com> > wrote: > > > 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 > > > > > -- > Thiago > -- Charan