Re: T5:Tiles?
Hi Josh, When i tested in the localhost, the speed is fast, so that behavor is not noticeable, but when I put the war file in a slow server in the net, I can notice that in Safari, not in IE and FireFox. I believe I have put those pages/components in the right places. I did not notice reloading of the page, but the change of url only. A.C. Josh Canfield wrote: > >> you will see in the address field first: >> http://localhost/sample/layout.forums >> then it goes back to http://localhost/sample/forums >> >> but for Firefox or IE either in mac or windows, the layout.forums >> will not >> be shown, only the final one. > > I've tried it in Safari on my Mac and I've never seen that behavior. > I don't believe that another request is generated simply by loading > the page. Can you provide more information about what you are doing? > Are your components and pages in the right folders? > > > TheDailyTube.com. The best new videos on the internet delivered fresh > to your inbox. > > > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12399480 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Hi Josh, This error is interesting, it comes out only once even you have several pages using the approach 2 and it works with the error around. adding t:id="layout' eliminate the error message. probably a minor problem in the error reporting? A.C. Josh Canfield-2 wrote: > > On 8/29/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> >> Hi Josh, >> >> if I use the approach quoted below, I got an error like this from runtime >> console, and the title was not set: >> >> [ERROR] Login Embedded component(s) layout are defined within component >> class org.sample.t5.pages.Login, but are not present in the component >> template. > > > The error message says that you don't have the component in your template. > You can't inject the component into your class if it doesn't exist in the > template If you do have the layout component in the template then try > adding > an t:id="layout" to the template. > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12399469 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
On 8/29/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > > Hi Josh, > > if I use the approach quoted below, I got an error like this from runtime > console, and the title was not set: > > [ERROR] Login Embedded component(s) layout are defined within component > class org.sample.t5.pages.Login, but are not present in the component > template. The error message says that you don't have the component in your template. You can't inject the component into your class if it doesn't exist in the template If you do have the layout component in the template then try adding an t:id="layout" to the template. -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5:Tiles?
Hi Josh, if I use the approach quoted below, I got an error like this from runtime console, and the title was not set: [ERROR] Login Embedded component(s) layout are defined within component class org.sample.t5.pages.Login, but are not present in the component template. What I'm doing wrong here? my code is: @Component private Layout layout; // add getter/setter protected void beforeRender() { layout.setTitle("test"); } Thanks, A.C. < You can inject the Layout object into Somepage and manipulate it by: @Component private Layout layout; // add getter/setter protected void beforeRender() { layout.setTitle(title); } > Josh Canfield-2 wrote: > > On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> Hi Josh, >> >> This works, now if I have this in the Layout.html: >> >> >>${title} >> >> >> Layout.java also has a getTtitle to return 'base page'; >> >> now how to replace this title with 'somepage' in the somepage.html? I add >> a >> getTitle in the Somepage.java, but it still picks up 'base page', any >> solution to this? >> > > There is no inheritance relationship between Somepage and Layout. > Somepage contains a reference to the Layout object. You have options > with how you are going to update the layout. > > You can inject the Layout object into Somepage and manipulate it by: > > @Component > private Layout layout; // add getter/setter > protected void beforeRender() { > layout.setTitle(title); > } > > or you can add the title parameter to Layout and pass it from Somepage > > Layout.java: > @Parameter // if you want to require a title, add (required=true) > private String title; // add getter/setter > > Somepage.html > > ... > > > Pick the one that makes the most sense for your application > > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12382045 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
you will see in the address field first: http://localhost/sample/layout.forums then it goes back to http://localhost/sample/forums but for Firefox or IE either in mac or windows, the layout.forums will not be shown, only the final one. I've tried it in Safari on my Mac and I've never seen that behavior. I don't believe that another request is generated simply by loading the page. Can you provide more information about what you are doing? Are your components and pages in the right folders? TheDailyTube.com. The best new videos on the internet delivered fresh to your inbox.
Re: T5:Tiles?
Hi Josh, Your tip works, just an observation, when viewing the page in Mac's Safari, for the url: http://localhost/sample/forums you will see in the address field first: http://localhost/sample/layout.forums then it goes back to http://localhost/sample/forums but for Firefox or IE either in mac or windows, the layout.forums will not be shown, only the final one. Josh Canfield-2 wrote: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> > > Could it be as silly as a space after the xsd? > > I have run the following successfully > > - > /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html > --- > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > SomePage Added Sidebar > > This is the body content > > > - > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html > --- > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > The Header > > > > > Top of Sidebar > > Bottom of Sidebar > > The Footer > > > > > -- Layout.java --- > > package com.thedailytube.ui.tapestry.components; > > import org.apache.tapestry.Block; > import org.apache.tapestry.annotations.Parameter; > > public class Layout { > @Parameter > private Block _sidebarContent; > > public Block getSidebarContent() { > return _sidebarContent; > } > > public void setSidebarContent(Block sidebarContent) { > this._sidebarContent = sidebarContent; > } > } > > --- SomePage.java > > package com.thedailytube.ui.tapestry.pages; > > public class SomePage { > > } > > http://localhost:8080/somepage - > > > type="text/css"> > > The Header > > > > This is the body content > > > > Top of Sidebar > > SomePage Added Sidebar > > Bottom of Sidebar > > The Footer > > > > > > > > Josh > > On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> >> Hi Josh, >> >> I added that but got another error: >> >> Component Somepage does not contain an embedded component with id 'html'. >> >> This is the Somepage.html: >> >> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> >> >> >> Add this additional to the sidebar >> >> All of this goes into the content section >> >> >> >> >> >> Josh Canfield-2 wrote: >> > >> > Sorry, I should have had the Layout.java in there too... What that >> error >> > is >> > telling you is that it's looking for the 'sidebarContent' property in >> your >> > Layout.java class. You can define it as below: >> > >> > public class Layout { >> > @Parameter >> > private Block _sidebarContent; >> > >> > public Block getSidebarContent() { >> > return _sidebarContent; >> > } >> > >> > public void setSidebarContent(Block sidebarContent) { >> > this._sidebarContent = sidebarContent; >> > } >> > } >> > >> > Josh >> > >> > On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> Hi Josh, >> >> >> >> This looks interesting, I tried it with following steps: >> >> >> >> 1.put Layout.html in the myapp/components, add also a Layout.java >> >> 2. put Somepage.html under WEB-INTF, add Somepage.java in myapp/pages >> >> >> >> when I access it with http://localhost:8080/Somepage.html, I got >> >> following >> >> error: >> >> >> >> Could not convert 'sidebarContent' into a component parameter binding: >> >> Class >> >> org.example.myapp.components.Layout does not contain a property named >> >> 'sidebarContent' (within property expression 'sidebarContent'). >> >> >> >> What I did wrong here? Thanks, >> >> >> >> A.C. >> >> >> >> >> >> Josh Canfield-2 wrote: >> >> > >> >> > I love delegate for this type of stuff. If you want to define a >> layout >> >> and >> >> > let the page decide what goes in the layout define a block parameter >> >> and >> >> > use >> >> > delegate to render it: >> >> > >> >> > (this has been truncated and modified for brevity, so while this may >> >> not >> >> > work out of the box it's full size cousin does work...) >> >> > >> >> > somepage.html >> >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd >> >> "> >> >> > >> >> > Add this additional to the sidebar >> >> > >> >> > All of this goes into the content section >> >> > >> >> > >> >> > >> >> > >> >> > - layout.html >> >> > >> >> > > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> >> >> > ... >> >> > >> >> > >> >> > ... >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > ... >> >> > >> >> > >> >> > >> >> > >> >> > Enjoy, >> >> > Josh >> >> > >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12305428 >> >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additi
Re: T5:Tiles?
Em Tue, 28 Aug 2007 20:52:28 -0300, Angelo Chen <[EMAIL PROTECTED]> escreveu: Class org.sample.t5.pages.Home does not contain a property named 'myhome' (within property expression 'myhome'). You want Try The literal: prefix guarantees that the value after it is treated as a String. The default prefix for all bindings is prop:, as the error above shows. :) Thiago. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Hi Josh, I did like this: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> but I got an error: Class org.sample.t5.pages.Home does not contain a property named 'myhome' (within property expression 'myhome'). Josh Canfield-2 wrote: > > I think your problem is here: > >> in my Somepage.html >> >> > > You want > > > > Josh > > On 8/28/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> Hi Josh, >> >> I tried to folow following method, but not working: >> >> my Layout.java like this: >> >> public class Layout { >> >>@Parameter >>private Block _sidebarContent; >> >>public Block getSidebarContent() { >>return _sidebarContent; >>} >> >>public void setSidebarContent(Block sidebarContent) { >>this._sidebarContent = sidebarContent; >>} >> >>@Parameter >>private String _title; >>public String getTitle() { >>return _title; >>} >> >>public void setTitle(String title) { >>this._title = title; >>} >> >> } >> >> in my Somepage.html >> >> >> i noticed the setter in Layout.java will not be called, why? thanks. >> >> A.C. >> >> >> >> >> >> >> or you can add the title parameter to Layout and pass it from Somepage >> >> Layout.java: >> @Parameter // if you want to require a title, add (required=true) >> private String title; // add getter/setter >> >> Somepage.html >> >> ... >> >> >> >> >> Josh Canfield-2 wrote: >> > >> > On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> >> >> Hi Josh, >> >> >> >> This works, now if I have this in the Layout.html: >> >> >> >> >> >>${title} >> >> >> >> >> >> Layout.java also has a getTtitle to return 'base page'; >> >> >> >> now how to replace this title with 'somepage' in the somepage.html? I >> add >> >> a >> >> getTitle in the Somepage.java, but it still picks up 'base page', any >> >> solution to this? >> >> >> > >> > There is no inheritance relationship between Somepage and Layout. >> > Somepage contains a reference to the Layout object. You have options >> > with how you are going to update the layout. >> > >> > You can inject the Layout object into Somepage and manipulate it by: >> > >> > @Component >> > private Layout layout; // add getter/setter >> > protected void beforeRender() { >> > layout.setTitle(title); >> > } >> > >> > or you can add the title parameter to Layout and pass it from Somepage >> > >> > Layout.java: >> > @Parameter // if you want to require a title, add (required=true) >> > private String title; // add getter/setter >> > >> > Somepage.html >> > >> > ... >> > >> > >> > Pick the one that makes the most sense for your application >> > >> > >> > >> >> A.C. >> >> Josh Canfield-2 wrote: >> >> > >> >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd >> "> >> >> > >> >> > Could it be as silly as a space after the xsd? >> >> > >> >> > I have run the following successfully >> >> > >> >> > - >> >> > >> >> >> /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html >> >> > --- >> >> > >> >> > > >> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> >> >> > >> >> > SomePage Added Sidebar >> >> > >> >> > This is the body content >> >> > >> >> > >> >> > - >> >> > >> /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html >> >> > --- >> >> > >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092 >> >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > >> > -- >> > -- >> > TheDailyTube.com. Sign up and get the best new videos on the internet >> > delivered fresh to your inbox. >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12368634 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12378608 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail:
Re: T5:Tiles?
I think your problem is here: > in my Somepage.html > > You want Josh On 8/28/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi Josh, > > I tried to folow following method, but not working: > > my Layout.java like this: > > public class Layout { > >@Parameter >private Block _sidebarContent; > >public Block getSidebarContent() { >return _sidebarContent; >} > >public void setSidebarContent(Block sidebarContent) { >this._sidebarContent = sidebarContent; >} > >@Parameter >private String _title; >public String getTitle() { >return _title; >} > >public void setTitle(String title) { >this._title = title; >} > > } > > in my Somepage.html > > > i noticed the setter in Layout.java will not be called, why? thanks. > > A.C. > > > > > > > or you can add the title parameter to Layout and pass it from Somepage > > Layout.java: > @Parameter // if you want to require a title, add (required=true) > private String title; // add getter/setter > > Somepage.html > > ... > > > > > Josh Canfield-2 wrote: > > > > On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > >> > >> Hi Josh, > >> > >> This works, now if I have this in the Layout.html: > >> > >> > >>${title} > >> > >> > >> Layout.java also has a getTtitle to return 'base page'; > >> > >> now how to replace this title with 'somepage' in the somepage.html? I add > >> a > >> getTitle in the Somepage.java, but it still picks up 'base page', any > >> solution to this? > >> > > > > There is no inheritance relationship between Somepage and Layout. > > Somepage contains a reference to the Layout object. You have options > > with how you are going to update the layout. > > > > You can inject the Layout object into Somepage and manipulate it by: > > > > @Component > > private Layout layout; // add getter/setter > > protected void beforeRender() { > > layout.setTitle(title); > > } > > > > or you can add the title parameter to Layout and pass it from Somepage > > > > Layout.java: > > @Parameter // if you want to require a title, add (required=true) > > private String title; // add getter/setter > > > > Somepage.html > > > > ... > > > > > > Pick the one that makes the most sense for your application > > > > > > > >> A.C. > >> Josh Canfield-2 wrote: > >> > > >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> > >> > > >> > Could it be as silly as a space after the xsd? > >> > > >> > I have run the following successfully > >> > > >> > - > >> > > >> /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html > >> > --- > >> > > >> > >> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > >> > > >> > SomePage Added Sidebar > >> > > >> > This is the body content > >> > > >> > > >> > - > >> > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html > >> > --- > >> > > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092 > >> Sent from the Tapestry - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > > > -- > > -- > > TheDailyTube.com. Sign up and get the best new videos on the internet > > delivered fresh to your inbox. > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12368634 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Hi Josh, I tried to folow following method, but not working: my Layout.java like this: public class Layout { @Parameter private Block _sidebarContent; public Block getSidebarContent() { return _sidebarContent; } public void setSidebarContent(Block sidebarContent) { this._sidebarContent = sidebarContent; } @Parameter private String _title; public String getTitle() { return _title; } public void setTitle(String title) { this._title = title; } } in my Somepage.html i noticed the setter in Layout.java will not be called, why? thanks. A.C. or you can add the title parameter to Layout and pass it from Somepage Layout.java: @Parameter // if you want to require a title, add (required=true) private String title; // add getter/setter Somepage.html ... Josh Canfield-2 wrote: > > On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> Hi Josh, >> >> This works, now if I have this in the Layout.html: >> >> >>${title} >> >> >> Layout.java also has a getTtitle to return 'base page'; >> >> now how to replace this title with 'somepage' in the somepage.html? I add >> a >> getTitle in the Somepage.java, but it still picks up 'base page', any >> solution to this? >> > > There is no inheritance relationship between Somepage and Layout. > Somepage contains a reference to the Layout object. You have options > with how you are going to update the layout. > > You can inject the Layout object into Somepage and manipulate it by: > > @Component > private Layout layout; // add getter/setter > protected void beforeRender() { > layout.setTitle(title); > } > > or you can add the title parameter to Layout and pass it from Somepage > > Layout.java: > @Parameter // if you want to require a title, add (required=true) > private String title; // add getter/setter > > Somepage.html > > ... > > > Pick the one that makes the most sense for your application > > > >> A.C. >> Josh Canfield-2 wrote: >> > >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> >> > >> > Could it be as silly as a space after the xsd? >> > >> > I have run the following successfully >> > >> > - >> > >> /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html >> > --- >> > >> > > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> >> > >> > SomePage Added Sidebar >> > >> > This is the body content >> > >> > >> > - >> > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html >> > --- >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12368634 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi Josh, > > This works, now if I have this in the Layout.html: > > >${title} > > > Layout.java also has a getTtitle to return 'base page'; > > now how to replace this title with 'somepage' in the somepage.html? I add a > getTitle in the Somepage.java, but it still picks up 'base page', any > solution to this? > There is no inheritance relationship between Somepage and Layout. Somepage contains a reference to the Layout object. You have options with how you are going to update the layout. You can inject the Layout object into Somepage and manipulate it by: @Component private Layout layout; // add getter/setter protected void beforeRender() { layout.setTitle(title); } or you can add the title parameter to Layout and pass it from Somepage Layout.java: @Parameter // if you want to require a title, add (required=true) private String title; // add getter/setter Somepage.html ... Pick the one that makes the most sense for your application > A.C. > Josh Canfield-2 wrote: > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> > > > > Could it be as silly as a space after the xsd? > > > > I have run the following successfully > > > > - > > /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html > > --- > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > > SomePage Added Sidebar > > > > This is the body content > > > > > > - > > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html > > --- > > > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Yes, you can put other components inside of your block parameters. On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > > Hi Josh, > > What defined in the parameter block should be in the same > page(Somepage.html), can it refer to another html? > > A.C. > > somepage.html > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > Add this additional to the sidebar > > All of this goes into the content section > > > > > Josh Canfield-2 wrote: > > > > I love delegate for this type of stuff. If you want to define a layout > and > > let the page decide what goes in the layout define a block parameter and > > use > > delegate to render it: > > > > (this has been truncated and modified for brevity, so while this may not > > work out of the box it's full size cousin does work...) > > > > somepage.html > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd > "> > > > > Add this additional to the sidebar > > > > All of this goes into the content section > > > > > > > > > > - layout.html > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > ... > > > > > > ... > > > > > > > > > > > > > > > > ... > > > > > > > > > > Enjoy, > > Josh > > > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12307416 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5:Tiles?
Hey Angelo, Nick's right, sorry I didn't see that before. Try using your browsers view source feature, if you're using Firefox look into getting the firebug plugin (google for a tutorial) so you can inspect what is actually getting rendered, you should never not know what is getting generated in your page! Josh On 8/23/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > > The page location is "http://localhost:8080/Somepage"; > > "http://localhost:8080/Somepage.html"; is the location of component "html" > on the page "Somepage". I.e. Tapestry 5 uses "." to specify components. > (Which might actually be a bad idea.) > > Cheers, > Nick. > > > Angelo Chen wrote: > > Hi Josh, > > > > It works perfectly! thanks, It's my fault, I start the page directly: > > > > http://localhost:8080/Somepage.html. > > > > this works: > > > > somepage > > > > don't know what's the difference. > > > > A.C. > > > > > > Josh Canfield-2 wrote: > >> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> > >> > >> Could it be as silly as a space after the xsd? > >> > >> I have run the following successfully > >> > >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5:Tiles?
Hi Josh, This works, now if I have this in the Layout.html: ${title} Layout.java also has a getTtitle to return 'base page'; now how to replace this title with 'somepage' in the somepage.html? I add a getTitle in the Somepage.java, but it still picks up 'base page', any solution to this? A.C. Josh Canfield-2 wrote: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> > > Could it be as silly as a space after the xsd? > > I have run the following successfully > > - > /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html > --- > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > SomePage Added Sidebar > > This is the body content > > > - > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html > --- > > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Hi Josh, What defined in the parameter block should be in the same page(Somepage.html), can it refer to another html? A.C. somepage.html http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Add this additional to the sidebar All of this goes into the content section Josh Canfield-2 wrote: > > I love delegate for this type of stuff. If you want to define a layout and > let the page decide what goes in the layout define a block parameter and > use > delegate to render it: > > (this has been truncated and modified for brevity, so while this may not > work out of the box it's full size cousin does work...) > > somepage.html > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > Add this additional to the sidebar > > All of this goes into the content section > > > > > - layout.html > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > ... > > > ... > > > > > > > > ... > > > > > Enjoy, > Josh > > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12307416 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
The page location is "http://localhost:8080/Somepage"; "http://localhost:8080/Somepage.html"; is the location of component "html" on the page "Somepage". I.e. Tapestry 5 uses "." to specify components. (Which might actually be a bad idea.) Cheers, Nick. Angelo Chen wrote: Hi Josh, It works perfectly! thanks, It's my fault, I start the page directly: http://localhost:8080/Somepage.html. this works: somepage don't know what's the difference. A.C. Josh Canfield-2 wrote: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> Could it be as silly as a space after the xsd? I have run the following successfully - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Hi Josh, It works perfectly! thanks, It's my fault, I start the page directly: http://localhost:8080/Somepage.html. this works: somepage don't know what's the difference. A.C. Josh Canfield-2 wrote: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> > > Could it be as silly as a space after the xsd? > > I have run the following successfully > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12307066 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> Could it be as silly as a space after the xsd? I have run the following successfully - /src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html --- http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> SomePage Added Sidebar This is the body content - /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html --- http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> The Header Top of Sidebar Bottom of Sidebar The Footer -- Layout.java --- package com.thedailytube.ui.tapestry.components; import org.apache.tapestry.Block; import org.apache.tapestry.annotations.Parameter; public class Layout { @Parameter private Block _sidebarContent; public Block getSidebarContent() { return _sidebarContent; } public void setSidebarContent(Block sidebarContent) { this._sidebarContent = sidebarContent; } } --- SomePage.java package com.thedailytube.ui.tapestry.pages; public class SomePage { } http://localhost:8080/somepage - The Header This is the body content Top of Sidebar SomePage Added Sidebar Bottom of Sidebar The Footer Josh On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > > Hi Josh, > > I added that but got another error: > > Component Somepage does not contain an embedded component with id 'html'. > > This is the Somepage.html: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > Add this additional to the sidebar > > All of this goes into the content section > > > > > > Josh Canfield-2 wrote: > > > > Sorry, I should have had the Layout.java in there too... What that error > > is > > telling you is that it's looking for the 'sidebarContent' property in > your > > Layout.java class. You can define it as below: > > > > public class Layout { > > @Parameter > > private Block _sidebarContent; > > > > public Block getSidebarContent() { > > return _sidebarContent; > > } > > > > public void setSidebarContent(Block sidebarContent) { > > this._sidebarContent = sidebarContent; > > } > > } > > > > Josh > > > > On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > >> > >> > >> Hi Josh, > >> > >> This looks interesting, I tried it with following steps: > >> > >> 1.put Layout.html in the myapp/components, add also a Layout.java > >> 2. put Somepage.html under WEB-INTF, add Somepage.java in myapp/pages > >> > >> when I access it with http://localhost:8080/Somepage.html, I got > >> following > >> error: > >> > >> Could not convert 'sidebarContent' into a component parameter binding: > >> Class > >> org.example.myapp.components.Layout does not contain a property named > >> 'sidebarContent' (within property expression 'sidebarContent'). > >> > >> What I did wrong here? Thanks, > >> > >> A.C. > >> > >> > >> Josh Canfield-2 wrote: > >> > > >> > I love delegate for this type of stuff. If you want to define a > layout > >> and > >> > let the page decide what goes in the layout define a block parameter > >> and > >> > use > >> > delegate to render it: > >> > > >> > (this has been truncated and modified for brevity, so while this may > >> not > >> > work out of the box it's full size cousin does work...) > >> > > >> > somepage.html > >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd > >> "> > >> > > >> > Add this additional to the sidebar > >> > > >> > All of this goes into the content section > >> > > >> > > >> > > >> > > >> > - layout.html > >> > > >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > >> > ... > >> > > >> > > >> > ... > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > ... > >> > > >> > > >> > > >> > > >> > Enjoy, > >> > Josh > >> > > >> -- > >> View this message in context: > >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12305428 > >> Sent from the Tapestry - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > > -- > > TheDailyTube.com. Sign up and get the best new videos on the internet > > delivered fresh to your inbox. > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12306516 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5:Tiles?
Hi Josh, I added that but got another error: Component Somepage does not contain an embedded component with id 'html'. This is the Somepage.html: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Add this additional to the sidebar All of this goes into the content section Josh Canfield-2 wrote: > > Sorry, I should have had the Layout.java in there too... What that error > is > telling you is that it's looking for the 'sidebarContent' property in your > Layout.java class. You can define it as below: > > public class Layout { > @Parameter > private Block _sidebarContent; > > public Block getSidebarContent() { > return _sidebarContent; > } > > public void setSidebarContent(Block sidebarContent) { > this._sidebarContent = sidebarContent; > } > } > > Josh > > On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> >> Hi Josh, >> >> This looks interesting, I tried it with following steps: >> >> 1.put Layout.html in the myapp/components, add also a Layout.java >> 2. put Somepage.html under WEB-INTF, add Somepage.java in myapp/pages >> >> when I access it with http://localhost:8080/Somepage.html, I got >> following >> error: >> >> Could not convert 'sidebarContent' into a component parameter binding: >> Class >> org.example.myapp.components.Layout does not contain a property named >> 'sidebarContent' (within property expression 'sidebarContent'). >> >> What I did wrong here? Thanks, >> >> A.C. >> >> >> Josh Canfield-2 wrote: >> > >> > I love delegate for this type of stuff. If you want to define a layout >> and >> > let the page decide what goes in the layout define a block parameter >> and >> > use >> > delegate to render it: >> > >> > (this has been truncated and modified for brevity, so while this may >> not >> > work out of the box it's full size cousin does work...) >> > >> > somepage.html >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd >> "> >> > >> > Add this additional to the sidebar >> > >> > All of this goes into the content section >> > >> > >> > >> > >> > - layout.html >> > >> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> >> > ... >> > >> > >> > ... >> > >> > >> > >> > >> > >> > >> > >> > ... >> > >> > >> > >> > >> > Enjoy, >> > Josh >> > >> -- >> View this message in context: >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12305428 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12306516 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Sorry, I should have had the Layout.java in there too... What that error is telling you is that it's looking for the 'sidebarContent' property in your Layout.java class. You can define it as below: public class Layout { @Parameter private Block _sidebarContent; public Block getSidebarContent() { return _sidebarContent; } public void setSidebarContent(Block sidebarContent) { this._sidebarContent = sidebarContent; } } Josh On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > > Hi Josh, > > This looks interesting, I tried it with following steps: > > 1.put Layout.html in the myapp/components, add also a Layout.java > 2. put Somepage.html under WEB-INTF, add Somepage.java in myapp/pages > > when I access it with http://localhost:8080/Somepage.html, I got following > error: > > Could not convert 'sidebarContent' into a component parameter binding: > Class > org.example.myapp.components.Layout does not contain a property named > 'sidebarContent' (within property expression 'sidebarContent'). > > What I did wrong here? Thanks, > > A.C. > > > Josh Canfield-2 wrote: > > > > I love delegate for this type of stuff. If you want to define a layout > and > > let the page decide what goes in the layout define a block parameter and > > use > > delegate to render it: > > > > (this has been truncated and modified for brevity, so while this may not > > work out of the box it's full size cousin does work...) > > > > somepage.html > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd > "> > > > > Add this additional to the sidebar > > > > All of this goes into the content section > > > > > > > > > > - layout.html > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > ... > > > > > > ... > > > > > > > > > > > > > > > > ... > > > > > > > > > > Enjoy, > > Josh > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12305428 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5:Tiles?
Hi Josh, This looks interesting, I tried it with following steps: 1.put Layout.html in the myapp/components, add also a Layout.java 2. put Somepage.html under WEB-INTF, add Somepage.java in myapp/pages when I access it with http://localhost:8080/Somepage.html, I got following error: Could not convert 'sidebarContent' into a component parameter binding: Class org.example.myapp.components.Layout does not contain a property named 'sidebarContent' (within property expression 'sidebarContent'). What I did wrong here? Thanks, A.C. Josh Canfield-2 wrote: > > I love delegate for this type of stuff. If you want to define a layout and > let the page decide what goes in the layout define a block parameter and > use > delegate to render it: > > (this has been truncated and modified for brevity, so while this may not > work out of the box it's full size cousin does work...) > > somepage.html > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > Add this additional to the sidebar > > All of this goes into the content section > > > > > - layout.html > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > ... > > > ... > > > > > > > > ... > > > > > Enjoy, > Josh > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12305428 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
I personally use this exact process for builkding widget based pages. Sent via BlackBerry by AT&T -Original Message- From: "Josh Canfield" <[EMAIL PROTECTED]> Date: Thu, 23 Aug 2007 11:16:55 To:"Tapestry users" Subject: Re: T5:Tiles? I love delegate for this type of stuff. If you want to define a layout and let the page decide what goes in the layout define a block parameter and use delegate to render it: (this has been truncated and modified for brevity, so while this may not work out of the box it's full size cousin does work...) somepage.html http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Add this additional to the sidebar All of this goes into the content section - layout.html http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> ... ... ... Enjoy, Josh On 8/23/07, Marcelo lotif <[EMAIL PROTECTED]> wrote: > > You can have one layout wrapping another component, like a menu or a > sidebar. Of course they are declared into separeted .html's. Then, into > the > Layout component you can 'call' the other components, like this call to an > existing Menu component into your workspace: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > &{title} > > > > > > > > > > > >Page content goes here. > > > > > > > and under src/main/resources/org/example/myapp/components you must declare > the Menu.html file just like this: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > FOO > > > and the menu will be inserted on the location declared inside the Layout > component. I'm not sure if you have to create a Menu.java too, but i ever > do. > > here you can also specify multiple templates, but the difference, at least > in this example, is that you have a 'main' wrapper that define the 'face' > of > you app by a default call (t:body/>) and explicit calls to specified > components. > > Is that what you meant? > > 2007/8/23, Angelo Chen <[EMAIL PROTECTED]>: > > > > > > Hi Marcelo, > > > > This works, thanks. Is this documented in T5 site? > > > > The difference between this(Border?) and Tiles is, in Tiles layout you > can > > specify multiple JSPs, T5's border can have only one, but you can have > one > > after the other. so the syntax is: > > > > > > > > > > right? > > > > > > > > > > > > Marcelo lotif wrote: > > > > > > If this help, try to follow my example above: > > > > > > create a class under src/main/java/org/example/myapp/components called > > > Layout.java, for example. Now we put a css stylesheet and a title, > just > > to > > > illustrate: > > > > > > public class Layout { > > > > > > @Inject > > > @Path("context:assets/css/layout.css") > > > private Asset layoutCSS; > > > > > > private String title = "Some Title"; > > > > > > public Asset getLayoutCSS() { > > > return layoutCSS; > > > } > > > > > > public String getTitle() { > > > return title; > > > } > > > > > > } > > > > > > now, create a template under > > > src/main/resources/org/example/myapp/components > > > with the same name (i.e. Layout.html): > > > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > > > > &{title} > > > > > > > > > > > > > > > > > > > > > Page content goes here. > > > > > > > > > > > > > > > > > > > > > let the Start.html use this template as it's base adding this lines to > > it: > > > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd > > "> > > > > > > > > > > > > and you're done! > > > very simple! :) > > > > > > 2007/8/22, Anton Gavazuk <[EMAIL PROTECTED]>: > > >> > > >> Hi Angelo, > > >> I had the same question and as I understood - you have t
Re: T5:Tiles?
I love delegate for this type of stuff. If you want to define a layout and let the page decide what goes in the layout define a block parameter and use delegate to render it: (this has been truncated and modified for brevity, so while this may not work out of the box it's full size cousin does work...) somepage.html http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Add this additional to the sidebar All of this goes into the content section - layout.html http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> ... ... ... Enjoy, Josh On 8/23/07, Marcelo lotif <[EMAIL PROTECTED]> wrote: > > You can have one layout wrapping another component, like a menu or a > sidebar. Of course they are declared into separeted .html's. Then, into > the > Layout component you can 'call' the other components, like this call to an > existing Menu component into your workspace: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > &{title} > > > > > > > > > > > >Page content goes here. > > > > > > > and under src/main/resources/org/example/myapp/components you must declare > the Menu.html file just like this: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > FOO > > > and the menu will be inserted on the location declared inside the Layout > component. I'm not sure if you have to create a Menu.java too, but i ever > do. > > here you can also specify multiple templates, but the difference, at least > in this example, is that you have a 'main' wrapper that define the 'face' > of > you app by a default call (t:body/>) and explicit calls to specified > components. > > Is that what you meant? > > 2007/8/23, Angelo Chen <[EMAIL PROTECTED]>: > > > > > > Hi Marcelo, > > > > This works, thanks. Is this documented in T5 site? > > > > The difference between this(Border?) and Tiles is, in Tiles layout you > can > > specify multiple JSPs, T5's border can have only one, but you can have > one > > after the other. so the syntax is: > > > > > > > > > > right? > > > > > > > > > > > > Marcelo lotif wrote: > > > > > > If this help, try to follow my example above: > > > > > > create a class under src/main/java/org/example/myapp/components called > > > Layout.java, for example. Now we put a css stylesheet and a title, > just > > to > > > illustrate: > > > > > > public class Layout { > > > > > > @Inject > > > @Path("context:assets/css/layout.css") > > > private Asset layoutCSS; > > > > > > private String title = "Some Title"; > > > > > > public Asset getLayoutCSS() { > > > return layoutCSS; > > > } > > > > > > public String getTitle() { > > > return title; > > > } > > > > > > } > > > > > > now, create a template under > > > src/main/resources/org/example/myapp/components > > > with the same name (i.e. Layout.html): > > > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > > > > &{title} > > > > > > > > > > > > > > > > > > > > > Page content goes here. > > > > > > > > > > > > > > > > > > > > > let the Start.html use this template as it's base adding this lines to > > it: > > > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd > > "> > > > > > > > > > > > > and you're done! > > > very simple! :) > > > > > > 2007/8/22, Anton Gavazuk <[EMAIL PROTECTED]>: > > >> > > >> Hi Angelo, > > >> I had the same question and as I understood - you have to write your > > own > > >> custom component > > >> see > > >> > http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html > > >> and now I try to implement this - if you are interested - we can > > >> communicate > > >> about the topic and create some kind of howto... > > >> > > >> 2007/8/22, Angelo Chen <[EMAIL PROTECTED] >: > > >> > > > >> > > > >> > Hi, > > >> > > > >> > Is there a way to do something like Struts with Tiles in Tapestry > 5? > > >> > samples? Thanks. > > >> > > > >> > A.C. > > >> > -- > > >> > View this message in context: > > >> > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 > > >> > Sent from the Tapestry - User mailing list archive at Nabble.com. > > >> > > > >> > > > >> > > - > > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > > >> > For additional commands, e-mail: [EMAIL PROTECTED] > > >> > > > >> > > > >> > > > > > > > > > > > > -- > > > Atenciosamente, > > > Marcelo Lotif > > > > > > > > > > -- > > View this message in context: > > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12291330 > > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > > > --
Re: T5:Tiles?
You can have one layout wrapping another component, like a menu or a sidebar. Of course they are declared into separeted .html's. Then, into the Layout component you can 'call' the other components, like this call to an existing Menu component into your workspace: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> &{title} Page content goes here. and under src/main/resources/org/example/myapp/components you must declare the Menu.html file just like this: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> FOO and the menu will be inserted on the location declared inside the Layout component. I'm not sure if you have to create a Menu.java too, but i ever do. here you can also specify multiple templates, but the difference, at least in this example, is that you have a 'main' wrapper that define the 'face' of you app by a default call (t:body/>) and explicit calls to specified components. Is that what you meant? 2007/8/23, Angelo Chen <[EMAIL PROTECTED]>: > > > Hi Marcelo, > > This works, thanks. Is this documented in T5 site? > > The difference between this(Border?) and Tiles is, in Tiles layout you can > specify multiple JSPs, T5's border can have only one, but you can have one > after the other. so the syntax is: > > > > > right? > > > > > > Marcelo lotif wrote: > > > > If this help, try to follow my example above: > > > > create a class under src/main/java/org/example/myapp/components called > > Layout.java, for example. Now we put a css stylesheet and a title, just > to > > illustrate: > > > > public class Layout { > > > > @Inject > > @Path("context:assets/css/layout.css") > > private Asset layoutCSS; > > > > private String title = "Some Title"; > > > > public Asset getLayoutCSS() { > > return layoutCSS; > > } > > > > public String getTitle() { > > return title; > > } > > > > } > > > > now, create a template under > > src/main/resources/org/example/myapp/components > > with the same name (i.e. Layout.html): > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > > &{title} > > > > > > > > > > > > > > Page content goes here. > > > > > > > > > > > > > > let the Start.html use this template as it's base adding this lines to > it: > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd > "> > > > > > > > > and you're done! > > very simple! :) > > > > 2007/8/22, Anton Gavazuk <[EMAIL PROTECTED]>: > >> > >> Hi Angelo, > >> I had the same question and as I understood - you have to write your > own > >> custom component > >> see > >> http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html > >> and now I try to implement this - if you are interested - we can > >> communicate > >> about the topic and create some kind of howto... > >> > >> 2007/8/22, Angelo Chen <[EMAIL PROTECTED] >: > >> > > >> > > >> > Hi, > >> > > >> > Is there a way to do something like Struts with Tiles in Tapestry 5? > >> > samples? Thanks. > >> > > >> > A.C. > >> > -- > >> > View this message in context: > >> > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 > >> > Sent from the Tapestry - User mailing list archive at Nabble.com. > >> > > >> > > >> > - > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > > > > > > > > -- > > Atenciosamente, > > Marcelo Lotif > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12291330 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Atenciosamente, Marcelo Lotif
Re: T5:Tiles?
Hi Marcelo, This works, thanks. Is this documented in T5 site? The difference between this(Border?) and Tiles is, in Tiles layout you can specify multiple JSPs, T5's border can have only one, but you can have one after the other. so the syntax is: right? Marcelo lotif wrote: > > If this help, try to follow my example above: > > create a class under src/main/java/org/example/myapp/components called > Layout.java, for example. Now we put a css stylesheet and a title, just to > illustrate: > > public class Layout { > > @Inject > @Path("context:assets/css/layout.css") > private Asset layoutCSS; > > private String title = "Some Title"; > > public Asset getLayoutCSS() { > return layoutCSS; > } > > public String getTitle() { > return title; > } > > } > > now, create a template under > src/main/resources/org/example/myapp/components > with the same name (i.e. Layout.html): > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > &{title} > > > > > > > Page content goes here. > > > > > > > let the Start.html use this template as it's base adding this lines to it: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > > and you're done! > very simple! :) > > 2007/8/22, Anton Gavazuk <[EMAIL PROTECTED]>: >> >> Hi Angelo, >> I had the same question and as I understood - you have to write your own >> custom component >> see >> http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html >> and now I try to implement this - if you are interested - we can >> communicate >> about the topic and create some kind of howto... >> >> 2007/8/22, Angelo Chen <[EMAIL PROTECTED] >: >> > >> > >> > Hi, >> > >> > Is there a way to do something like Struts with Tiles in Tapestry 5? >> > samples? Thanks. >> > >> > A.C. >> > -- >> > View this message in context: >> > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 >> > Sent from the Tapestry - User mailing list archive at Nabble.com. >> > >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > > > > -- > Atenciosamente, > Marcelo Lotif > > -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12291330 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Of course you are not at all limited to only one of these "layout" components. While you can only request one per page or component, the "layout" you request could itself use another layout. For lack of a better term, these used to be called Borders in Tapestry 4. You can also have these borders on Components, not just pages. This can be useful for wrapping a component in a box, for example. Borders are really simple to make, as you've seen from Marcelo. Now lets say you end up having lots of borders/layout components. If you want to put them into a directory under components/, you'll access them using a "." between the directory name and the border component name. i.e. for components/layouts/border1.html you would use: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> On 8/22/07, Marcelo lotif <[EMAIL PROTECTED]> wrote: > If this help, try to follow my example above: > > create a class under src/main/java/org/example/myapp/components called > Layout.java, for example. Now we put a css stylesheet and a title, just to > illustrate: > > public class Layout { > > @Inject > @Path("context:assets/css/layout.css") > private Asset layoutCSS; > > private String title = "Some Title"; > > public Asset getLayoutCSS() { > return layoutCSS; > } > > public String getTitle() { > return title; > } > > } > > now, create a template under src/main/resources/org/example/myapp/components > with the same name (i.e. Layout.html): > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > &{title} > > > > > > > Page content goes here. > > > > > > > let the Start.html use this template as it's base adding this lines to it: > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > > > > and you're done! > very simple! :) > > 2007/8/22, Anton Gavazuk <[EMAIL PROTECTED]>: > > > > Hi Angelo, > > I had the same question and as I understood - you have to write your own > > custom component > > see > > http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html > > and now I try to implement this - if you are interested - we can > > communicate > > about the topic and create some kind of howto... > > > > 2007/8/22, Angelo Chen <[EMAIL PROTECTED] >: > > > > > > > > > Hi, > > > > > > Is there a way to do something like Struts with Tiles in Tapestry 5? > > > samples? Thanks. > > > > > > A.C. > > > -- > > > View this message in context: > > > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 > > > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > Atenciosamente, > Marcelo Lotif > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
If this help, try to follow my example above: create a class under src/main/java/org/example/myapp/components called Layout.java, for example. Now we put a css stylesheet and a title, just to illustrate: public class Layout { @Inject @Path("context:assets/css/layout.css") private Asset layoutCSS; private String title = "Some Title"; public Asset getLayoutCSS() { return layoutCSS; } public String getTitle() { return title; } } now, create a template under src/main/resources/org/example/myapp/components with the same name (i.e. Layout.html): http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> &{title} Page content goes here. let the Start.html use this template as it's base adding this lines to it: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> and you're done! very simple! :) 2007/8/22, Anton Gavazuk <[EMAIL PROTECTED]>: > > Hi Angelo, > I had the same question and as I understood - you have to write your own > custom component > see > http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html > and now I try to implement this - if you are interested - we can > communicate > about the topic and create some kind of howto... > > 2007/8/22, Angelo Chen <[EMAIL PROTECTED] >: > > > > > > Hi, > > > > Is there a way to do something like Struts with Tiles in Tapestry 5? > > samples? Thanks. > > > > A.C. > > -- > > View this message in context: > > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 > > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Atenciosamente, Marcelo Lotif
Re: T5:Tiles?
Hi Angelo, I had the same question and as I understood - you have to write your own custom component see http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html and now I try to implement this - if you are interested - we can communicate about the topic and create some kind of howto... 2007/8/22, Angelo Chen <[EMAIL PROTECTED] >: > > > Hi, > > Is there a way to do something like Struts with Tiles in Tapestry 5? > samples? Thanks. > > A.C. > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
T5:Tiles?
Hi, Is there a way to do something like Struts with Tiles in Tapestry 5? samples? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]