Re: t:body + zone
I was talking of something like this. html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; head titleMy Nifty Web Application/title /head body div class=nav-top Nifty Web Application t:pagelink t:page=indexIndex/t:pagelink t:pagelink t:page=aboutAbout/t:pagelink /div t:alerts/ t:zone t:id=hello t:body/ /t:zone div class=nav-bottom (C) 2008 NiftyWebCo, Inc. /div /body /html one layout two pages Index and about.If pagelinks are used then the t:body is not rendered through ajax called..Most probably i have to use eventlinks but i dont know how through the callback i will load the appropriate t:body of the page (Index or about) t:body element should be loaded through ajax calls. On Tue, Aug 7, 2012 at 4:44 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 06 Aug 2012 19:36:17 -0300, Dimitris Zenios dimitris.zen...@gmail.com wrote: Any example or a hint please? Layout.tml: t:zone t:id=zone ... /t:zone On Tue, Aug 7, 2012 at 12:13 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios dimitris.zen...@gmail.com wrote: Is there a way to have a layout component and all its body would be rendered using zone? Yes, why not? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t:body + zone
On Tue, 07 Aug 2012 05:56:47 -0300, Dimitris Zenios dimitris.zen...@gmail.com wrote: I was talking of something like this. html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; head titleMy Nifty Web Application/title /head body div class=nav-top Nifty Web Application t:pagelink t:page=indexIndex/t:pagelink t:pagelink t:page=aboutAbout/t:pagelink /div t:alerts/ t:zone t:id=hello t:body/ /t:zone div class=nav-bottom (C) 2008 NiftyWebCo, Inc. /div /body /html This will work for the Index page. In this case, you won't need a Layout one because Index will serve as that. one layout two pages Index and about.If pagelinks are used then the t:body is not rendered through ajax called..Most probably i have to use eventlinks but i dont know how through the callback i will load the appropriate t:body of the page (Index or about) Don't use PageLink. Forget about t:body in this case. Use EventLink with zone=hello and return a Block or component instance. Using this approach, you'll need to have all the content in the same page and use the Environment for passing information. But you can try using different pages, but you won't be able to use the activation context for them. Instead, you'd need to use the Environment for passing data. For rendering other pages, try this (not tested): @Inject private ComponentSource componentSource; @Inject private Environment environment; Object onNameOfYourEvent() { // maybe some parameters for context Class pageClass = ...; // logic for determining next page. You can also use String instead. environment.push(); // passing information. return componentSource.getPage(pageClass).getComponentResources().getBody(); } -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
t:body + zone
Is there a way to have a layout component and all its body would be rendered using zone?Just like google plus does when you change between pages. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t:body + zone
On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios dimitris.zen...@gmail.com wrote: Is there a way to have a layout component and all its body would be rendered using zone? Yes, why not? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t:body + zone
Any example or a hint please? On Tue, Aug 7, 2012 at 12:13 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios dimitris.zen...@gmail.com wrote: Is there a way to have a layout component and all its body would be rendered using zone? Yes, why not? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t:body + zone
On Mon, 06 Aug 2012 19:36:17 -0300, Dimitris Zenios dimitris.zen...@gmail.com wrote: Any example or a hint please? Layout.tml: t:zone t:id=zone ... /t:zone On Tue, Aug 7, 2012 at 12:13 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios dimitris.zen...@gmail.com wrote: Is there a way to have a layout component and all its body would be rendered using zone? Yes, why not? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org