RE: best way to integrate a page or component to keep modular
Well it looks like... if I get to it... I will write a MyShineyNewComponent to do the job. right now I have some jar file hidden deep in my build somehow dragging in an early version of hibernate and taking me out cold.
Re: best way to integrate a page or component to keep modular
On Tue, May 21, 2013 at 7:29 AM, Ken in Nashua kcola...@live.com wrote: ok good answers guys... thanks... I cant say I am happy about it. I have to write a component just to embed a page ? No, you don't have to. You can use HTML FRAME or IFRAME to embed pages. Shouldn't there be a generic tapestry component to already do this ? Not sure about yours but my pages usually have headers (with navigation and login/logout links) and footers (with links to social networks etc) (and some of them has sidebars, with help tips and advertising maybe). If I embed one of this page to another then what would I have? Two footers, two headers and 2x sidebars? I doubt this is something that my users will like. But, if implement my pages with blocks, like: Page1.tml: t:layout t:delegate to=block:mainBlock / t:block id=mainBlock Page1 /t:block /t:layout Page2.tml t:layout t:delegate to=block:mainBlock / t:block id=mainBlock Page2 /t:block /t:layout Then on page3 I can embed contents of mainBlocks from page1 and page2 like this: Page3.tml t:layout t:delegate to=page1.mainBlock / t:delegate to=page2.mainBlock / /t:layout I think this is something you want to do, isn't it? ░▒█▓░ ░░░▓██▒░░ ░▒▓▒░░▒▓▒ ▒▒░░░ ░░░███▒▒███░░ ░░██████░ ░██▓░░███ ██▓▓██░░░ ░░░██▓░░███░░ ░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░ ░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░ ░██░░░▒░▒░▒░▒░▒░▒░▒██ ██▓░░▒░██▒░░░ ██░▒▒░░░██░░░ ░░░██▒░▒▒▒░░▓█▓░░ ░░░██░▒▒███░░██░░ ░░▓█▒░▒▒▒░░░▒██▓░▓█▒░ ░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░ ░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░ ░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░ ░██░░█▓▒█▓▒█▓ ░██░▓▓▒█▒░░░█▓░██ ▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██ ▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█ ██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█ ██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█ ██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█ ██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█ ██░▒██▒█░▓█▓▒██▒█ ██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█ ██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█ ▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██ ░██▒▒▒░░░▒░██ ░██░▒░▒█▓ ░▓█▒▒▒▓█░ ░░██▒▓▓▒▒▒██░ ░░██▒▒██░▒░▓▓▒██░ ░░▒██▒▒██▓░░▒▒██▒▒██░ ░░░██▒▒▒███▒░▒▒▒▓███▒▓██░ █████▒▒▒██░░░ ▓██▒▒▒░▒▓█▓▒░▒▒██▒░░░ ░███▒░░▒▒▒██▓ ░░██████░ ░░░███▓▓███░░ ▒▓███▓░░░ ░▒▓▓░ ░░░▓█▓▒▒▓█▓░░ ░▓██▒ ▒███▓▒░░░ -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: best way to integrate a page or component to keep modular
On Tue, 21 May 2013 01:31:54 -0300, Ken in Nashua kcola...@live.com wrote: cant I use the t:delegate to:myPageBlock /? Why do you keep trying to do things in Tapestry in a very non-Tapestry way? In Tapestry, pages are not meant for reuse, components are, so write components and be a happy camper. Don't expect us to help you in doing non-Tapestryish things. -- 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: best way to integrate a page or component to keep modular
Hi Ken Tapestry is a wonderful tool. I keep reading your questions and wondering why would somebody do that.. My humble suggestion would be to go through Igor's book and jumpstart examples and once you are done with them, checkout the tests in tapestry-core and tapestry-ioc source. I have seen people use tapestry in the wrong way and mess up their projects so bad that it takes months to get them back on track. :-( regards Taha On 21-May-2013, at 4:50 PM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 21 May 2013 01:31:54 -0300, Ken in Nashua kcola...@live.com wrote: cant I use the t:delegate to:myPageBlock /? Why do you keep trying to do things in Tapestry in a very non-Tapestry way? In Tapestry, pages are not meant for reuse, components are, so write components and be a happy camper. Don't expect us to help you in doing non-Tapestryish things. -- 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: best way to integrate a page or component to keep modular
Thanks Dimitri, Exactly... you hit the nail right on the head. I dont think i should have to write a component for every tab on a tab control just to reduce code bloat. Does anyone disagree with Dimitri ? If so i would like to hear it. There is no religion here... just common sense. : )
Re: best way to integrate a page or component to keep modular
??? Here some tabs. There's nothing to it. http://jumpstart.doublenegative.com.au/jumpstart/together/withlayout/helloworld Here are some more tabs. Again, nothing to it. http://tapestry-stitch.uklance.cloudbees.net/tabgroupdemo I hope this helps. Geoff On 22/05/2013, at 3:43 AM, Ken in Nashua wrote: Thanks Dimitri, Exactly... you hit the nail right on the head. I dont think i should have to write a component for every tab on a tab control just to reduce code bloat. Does anyone disagree with Dimitri ? If so i would like to hear it. There is no religion here... just common sense. : ) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: best way to integrate a page or component to keep modular
Dmitry, Thanks for that, I didn't realize you could delegate to blocks from other pages! -George On Mon, May 20, 2013 at 11:30 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote: But, if implement my pages with blocks, like: Page1.tml: t:layout t:delegate to=block:mainBlock / t:block id=mainBlock Page1 /t:block /t:layout Page2.tml t:layout t:delegate to=block:mainBlock / t:block id=mainBlock Page2 /t:block /t:layout Then on page3 I can embed contents of mainBlocks from page1 and page2 like this: Page3.tml t:layout t:delegate to=page1.mainBlock / t:delegate to=page2.mainBlock / /t:layout I think this is something you want to do, isn't it? -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: best way to integrate a page or component to keep modular
On Tue, 21 May 2013 19:33:02 -0300, George Ludwig georgelud...@gmail.com wrote: Dmitry, Thanks for that, I didn't realize you could delegate to blocks from other pages! The BeanModel-based components (Grid, BeanEditor, etc) are based on exactly that. -- 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: best way to integrate a page or component to keep modular
I should probably look at more Tapestry source :) On Tue, May 21, 2013 at 4:02 PM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 21 May 2013 19:33:02 -0300, George Ludwig georgelud...@gmail.com wrote: Dmitry, Thanks for that, I didn't realize you could delegate to blocks from other pages! The BeanModel-based components (Grid, BeanEditor, etc) are based on exactly that. -- Thiago H. de Paula Figueiredo --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: best way to integrate a page or component to keep modular
On Tue, 21 May 2013 20:16:39 -0300, George Ludwig georgelud...@gmail.com wrote: I should probably look at more Tapestry source :) I've learned a lot from reading it. Very, very well architected and well written. -- 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: best way to integrate a page or component to keep modular
Sounds like what you want is a layout component which uses t:body. For example: Layout.tml t:jquery.tabs t:listTabData=prop:ALevel t:activePanelId=aLevelTabsIndex t:block t:id=tab00!-- begin block tab3 -- h3add INFORMATION description here/h3 hr/ /t:block t:block t:id=tab01 h3ROSTERS please select a team/h3 hr/ t:body/ /t:block MyPage.tml t:layout ... Page content /t:layout This page provides further documentation: http://tapestry.apache.org/layout-component.html From: kcola...@live.com To: users@tapestry.apache.org Subject: RE: best way to integrate a page or component to keep modular Date: Sun, 19 May 2013 21:02:54 -0400 For instance... given this block of code.. t:jquery.tabs t:listTabData=prop:ALevel t:activePanelId=aLevelTabsIndex t:block t:id=tab00!-- begin block tab3 -- h3add INFORMATION description here/h3 hr/ /t:block t:block t:id=tab01 h3ROSTERS please select a team/h3 hr/ t:renderthispagerighthereinplace page=rosterQueryPage / /t:block is there such a component that will do the above renderthispagerighthereinplace ? Thanks
Re: best way to integrate a page or component to keep modular
On Mon, 20 May 2013 10:47:06 -0300, Ben Titmarsh ben.titma...@hotmail.co.uk wrote: Sounds like what you want is a layout component which uses t:body. Just a reminder that any component can use t:body and that a Layout component is something like a design patter in Tapestry, as all components are treated in the exact same way. -- 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: best way to integrate a page or component to keep modular
Guys, I stillk dont get it though... if I have a block like t:block /t:block How do I get a page rendered inside this block? I mean I have a page called RosterQuery.tml RosterQuery.java there is t:delegate/ t:body/ How do i put this together... I still dont know how to reference my page into the above block so it will embed render within theblock without having to copy and paste the whole page and clutter up my block.. All i want in my block is a one liner that will render my page. Can you tell me how this is done ? thanks
RE: best way to integrate a page or component to keep modular
you might be thinking I am inside my layout.tml... or my home.tml... almost... the case... My block is within my home.tml... which is already being laid thru to layout.tml and t:body/ is used in layout.tml my issue is just a surrogate tab block inside my home.tml all I want to do is embed the rendering of a page within the block I am specifying inside my home.tml any tips are very appreciated.
Re: best way to integrate a page or component to keep modular
You can't render a page in another page. And you probably should not. But you can move reusable part of one page to a component and use this new component on as many pages as you want just by writing t:MyNewShinyComponent /. It is the main feature of Tapestry - components as a way to reuse template and code. On Mon, May 20, 2013 at 10:44 PM, Ken in Nashua kcola...@live.com wrote: Guys, I stillk dont get it though... if I have a block like t:block /t:block How do I get a page rendered inside this block? I mean I have a page called RosterQuery.tml RosterQuery.java there is t:delegate/ t:body/ How do i put this together... I still dont know how to reference my page into the above block so it will embed render within theblock without having to copy and paste the whole page and clutter up my block.. All i want in my block is a one liner that will render my page. Can you tell me how this is done ? thanks
Re: best way to integrate a page or component to keep modular
On Mon, 20 May 2013 17:56:28 -0300, Cezary Biernacki cezary...@gmail.com wrote: You can't render a page in another page. And you probably should not. I'd say You should *not* render pages in other pages. Period. Write a component instead.. But you can move reusable part of one page to a component and use this new component on as many pages as you want just by writing t:MyNewShinyComponent /. It is the main feature of Tapestry - components as a way to reuse template and code. Exactly. We can't stress this enough: Tapestry is all about components and making it easier to write new ones. If you want to reuse stuff in Tapestry, put it in a component and use it in pages or other components. As with any other tool, don't try to go against the philosophy of it. -- 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: best way to integrate a page or component to keep modular
ok good answers guys... thanks... I cant say I am happy about it. I have to write a component just to embed a page ? Shouldn't there be a generic tapestry component to already do this ? ░▒█▓░ ░░░▓██▒░░ ░▒▓▒░░▒▓▒ ▒▒░░░ ░░░███▒▒███░░ ░░██████░ ░██▓░░███ ██▓▓██░░░ ░░░██▓░░███░░ ░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░ ░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░ ░██░░░▒░▒░▒░▒░▒░▒░▒██ ██▓░░▒░██▒░░░ ██░▒▒░░░██░░░ ░░░██▒░▒▒▒░░▓█▓░░ ░░░██░▒▒███░░██░░ ░░▓█▒░▒▒▒░░░▒██▓░▓█▒░ ░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░ ░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░ ░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░ ░██░░█▓▒█▓▒█▓ ░██░▓▓▒█▒░░░█▓░██ ▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██ ▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█ ██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█ ██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█ ██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█ ██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█ ██░▒██▒█░▓█▓▒██▒█ ██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█ ██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█ ▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██ ░██▒▒▒░░░▒░██ ░██░▒░▒█▓ ░▓█▒▒▒▓█░ ░░██▒░░▒▒▒██░ ░░██▒▒░▒▓█▓▒░▒██░ ░░▒██▒█████░░ ░░░██▒▒░▓███▒░▒▓███▒▓██░░ ██▒██▓░░▒▒▒░░▒████░░░ ▓██▒▒▒██░▒░▓▓▒▒██▒░░░ ░███▒▓▓▒▒▒██▓ ░░██████░ ░░░███▓▓███░░ ▒▓███▓░░░ ░▒▓▓░ ░░░▓█▓▒▒▓█▓░░ ░▓██▒ ▒███▓▒░░░
RE: best way to integrate a page or component to keep modular
cant I use the t:delegate to:myPageBlock / ?
RE: best way to integrate a page or component to keep modular
For instance... given this block of code.. t:jquery.tabs t:listTabData=prop:ALevel t:activePanelId=aLevelTabsIndex t:block t:id=tab00!-- begin block tab3 -- h3add INFORMATION description here/h3 hr/ /t:block t:block t:id=tab01 h3ROSTERS please select a team/h3 hr/ t:renderthispagerighthereinplace page=rosterQueryPage / /t:block is there such a component that will do the above renderthispagerighthereinplace ? Thanks