Re: multiple stylesheets
This is exactly why I dont use the Border pattern. you dont need it if you use modern html markup. Page specific titles & meta tags Occasional special stylesheets, javascript for a page id/class parameters on body tags variations of headers/footers/nav bars All go against using Border For an alternative to Border check out http://wiki.apache.org/tapestry/WysiwygWithoutBorder Henrik "Brian Long" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] > Nick, > > that worked perfectly, thanks! I just had to change a few things for it to > comply with T4, but unfortunately now I'm faced with another problem, > there's no titles on my stylesheets. > > Border.html > stylesheets="ognl:{assets.stylesheet1,assets.stylesheet2 > }"> > > Border.jwc > > > > gives me: > > href="/fast-store-app/css/style.css" > /> > href="/fast-store-app/css/template.css" /> > > but I'd like: > > href="/fast-store-app/css/style.css"title="default" > /> > href="/fast-store-app/css/template.css" title="super"/> > > So as I can select them on the fly from my browser's view->use style > setting. If you or anyone else has already figured out how to do this I'd > like to hear how it's done. > > Thanks again, Brian. > > > On 9/1/06, Nick Westgate <[EMAIL PROTECTED]> wrote: >> Hi Brian. >> >> Hopefully someone using T4 can offer you more help, >> but in my current T3 project I do this via ... >> >> Border.jwc - which has a stylesheets parameter: >> >> ... >> > class="blah.blah.Border" >> allow-informal-parameters="no"> >> >> direction="in"/> >> >> >> >> >> >> 'html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"' >> >> >> ... >> >> SomePage.html - which passes the array of stylesheet assets: >> >> >> >> >> >> >> ... >> >> SomePage.page - which defines the css assets: >> >> >> >> >> Cheers, >> Nick. >> >> >> Brian Long wrote: >> > Hi all, >> > >> > I'm afraid I might have dug myself into a hole (again!), but I hope > someone >> > my have already encountered this problem and is willing to let me know > of a >> > possible solution. >> > >> > I'm trying to add multiple stylesheets to my web project, I'm currently >> > using a @Shell component to enclose my web pages, this has a single >> > stylesheet as per the example on the tapestry website. >> > >> > >> > >> > I want to add some more, and according to the component description > there's >> > a parameter "stylesheets" that will take an array of IAssets, this is > want >> > I'd like to do, the only problem is that my shell in inside a custom >> > @Border >> > component. >> > >> > Soo, I have a Border.html and Border.jwc and I have to try and > create >> > an array of IAssets (my list of stylesheets). How do I do this, create >> > a >> > Border.java? >> > >> > Any suggestions would be much appreciated . . . >> > >> > /Brian. >> > >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple stylesheets
Brian, I've never had to do that, but it's pretty easy to hack the built-in Tapestry components. Just look at the java source for Shell and add the outputting of the title attributes. In this case it looks like that would be easy if you want the stylesheet title based on the css filename, but if you need to provide a different name for each one you'll have to do more. Perhaps add another Shell parameter that takes an array of title strings for the stylesheets. Cheers, Nick. Brian Long wrote: Nick, that worked perfectly, thanks! I just had to change a few things for it to comply with T4, but unfortunately now I'm faced with another problem, there's no titles on my stylesheets. Border.html stylesheets="ognl:{assets.stylesheet1,assets.stylesheet2 }"> Border.jwc gives me: but I'd like: So as I can select them on the fly from my browser's view->use style setting. If you or anyone else has already figured out how to do this I'd like to hear how it's done. Thanks again, Brian. On 9/1/06, Nick Westgate <[EMAIL PROTECTED]> wrote: Hi Brian. Hopefully someone using T4 can offer you more help, but in my current T3 project I do this via ... Border.jwc - which has a stylesheets parameter: ... direction="in"/> 'html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"' ... SomePage.html - which passes the array of stylesheet assets: ... SomePage.page - which defines the css assets: Cheers, Nick. Brian Long wrote: > Hi all, > > I'm afraid I might have dug myself into a hole (again!), but I hope someone > my have already encountered this problem and is willing to let me know of a > possible solution. > > I'm trying to add multiple stylesheets to my web project, I'm currently > using a @Shell component to enclose my web pages, this has a single > stylesheet as per the example on the tapestry website. > > Customer > Login"> > > I want to add some more, and according to the component description there's > a parameter "stylesheets" that will take an array of IAssets, this is want > I'd like to do, the only problem is that my shell in inside a custom > @Border > component. > > Soo, I have a Border.html and Border.jwc and I have to try and create > an array of IAssets (my list of stylesheets). How do I do this, create a > Border.java? > > Any suggestions would be much appreciated . . . > > /Brian. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple stylesheets
Well, in Tapestry 4.1.1 there's a new component @Style that can append stylesheets inside . It can be used from anywhere - even components can have their needed stylesheets appended. Here's some example usages: In Tapestry 4.0 or older, you should make use of the delegate parameter of @Shell You supply it with an IRender implementation, and it gets rendered just before Brian Long wrote: > Nick, > > that worked perfectly, thanks! I just had to change a few things for > it to > comply with T4, but unfortunately now I'm faced with another problem, > there's no titles on my stylesheets. > > Border.html > stylesheets="ognl:{assets.stylesheet1,assets.stylesheet2 > }"> > > Border.jwc > > > > gives me: > > href="/fast-store-app/css/style.css" > /> > href="/fast-store-app/css/template.css" /> > > but I'd like: > > href="/fast-store-app/css/style.css"title="default" > /> > href="/fast-store-app/css/template.css" title="super"/> > > So as I can select them on the fly from my browser's view->use style > setting. If you or anyone else has already figured out how to do this I'd > like to hear how it's done. > > Thanks again, Brian. > > > On 9/1/06, Nick Westgate <[EMAIL PROTECTED]> wrote: >> Hi Brian. >> >> Hopefully someone using T4 can offer you more help, >> but in my current T3 project I do this via ... >> >> Border.jwc - which has a stylesheets parameter: >> >> ... >> > class="blah.blah.Border" >> allow-informal-parameters="no"> >> >> direction="in"/> >> >> >> >> >> >> 'html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"' >> >> >> ... >> >> SomePage.html - which passes the array of stylesheet assets: >> >> >> >> >> >> >> ... >> >> SomePage.page - which defines the css assets: >> >> >> >> >> Cheers, >> Nick. >> >> >> Brian Long wrote: >> > Hi all, >> > >> > I'm afraid I might have dug myself into a hole (again!), but I hope > someone >> > my have already encountered this problem and is willing to let me know > of a >> > possible solution. >> > >> > I'm trying to add multiple stylesheets to my web project, I'm >> currently >> > using a @Shell component to enclose my web pages, this has a single >> > stylesheet as per the example on the tapestry website. >> > >> > >> > >> > I want to add some more, and according to the component description > there's >> > a parameter "stylesheets" that will take an array of IAssets, this is > want >> > I'd like to do, the only problem is that my shell in inside a custom >> > @Border >> > component. >> > >> > Soo, I have a Border.html and Border.jwc and I have to try and > create >> > an array of IAssets (my list of stylesheets). How do I do this, >> create a >> > Border.java? >> > >> > Any suggestions would be much appreciated . . . >> > >> > /Brian. >> > >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple stylesheets
Nick, that worked perfectly, thanks! I just had to change a few things for it to comply with T4, but unfortunately now I'm faced with another problem, there's no titles on my stylesheets. Border.html Border.jwc gives me: but I'd like: So as I can select them on the fly from my browser's view->use style setting. If you or anyone else has already figured out how to do this I'd like to hear how it's done. Thanks again, Brian. On 9/1/06, Nick Westgate <[EMAIL PROTECTED]> wrote: Hi Brian. Hopefully someone using T4 can offer you more help, but in my current T3 project I do this via ... Border.jwc - which has a stylesheets parameter: ... direction="in"/> 'html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"' ... SomePage.html - which passes the array of stylesheet assets: ... SomePage.page - which defines the css assets: Cheers, Nick. Brian Long wrote: > Hi all, > > I'm afraid I might have dug myself into a hole (again!), but I hope someone > my have already encountered this problem and is willing to let me know of a > possible solution. > > I'm trying to add multiple stylesheets to my web project, I'm currently > using a @Shell component to enclose my web pages, this has a single > stylesheet as per the example on the tapestry website. > > Customer > Login"> > > I want to add some more, and according to the component description there's > a parameter "stylesheets" that will take an array of IAssets, this is want > I'd like to do, the only problem is that my shell in inside a custom > @Border > component. > > Soo, I have a Border.html and Border.jwc and I have to try and create > an array of IAssets (my list of stylesheets). How do I do this, create a > Border.java? > > Any suggestions would be much appreciated . . . > > /Brian. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple stylesheets
Hi Brian. Hopefully someone using T4 can offer you more help, but in my current T3 project I do this via ... Border.jwc - which has a stylesheets parameter: ... 'html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"' ... SomePage.html - which passes the array of stylesheet assets: ... SomePage.page - which defines the css assets: Cheers, Nick. Brian Long wrote: Hi all, I'm afraid I might have dug myself into a hole (again!), but I hope someone my have already encountered this problem and is willing to let me know of a possible solution. I'm trying to add multiple stylesheets to my web project, I'm currently using a @Shell component to enclose my web pages, this has a single stylesheet as per the example on the tapestry website. I want to add some more, and according to the component description there's a parameter "stylesheets" that will take an array of IAssets, this is want I'd like to do, the only problem is that my shell in inside a custom @Border component. Soo, I have a Border.html and Border.jwc and I have to try and create an array of IAssets (my list of stylesheets). How do I do this, create a Border.java? Any suggestions would be much appreciated . . . /Brian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]