You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gunnar Eketrapp <gu...@gmail.com> on 2009/10/15 08:44:29 UTC

T5 / Include file ordering

Hi!

I am porting an app that have some page specific CSS files.

I added these in the page class files as ....

@IncludeStylesheet

... annotations.

I also have a border component that includes the main CSS file.

My question now is how do I get the main CSS to be loaded before the page
specific CSS.


Thanks in advance,
Gunnar Eketrapp

Re: T5 / Include file ordering

Posted by Gunnar Eketrapp <gu...@gmail.com>.
Ok!

Since I am including the main css from my border component it will be
included after any page spec. includes.

One cure would be to remove the include of the main css from the border
component and move it into the base page class.

I'll try that ...

/Gunnar


2009/10/15 Martin Reurings <ma...@windgazer.nl>

> TBH, a 'component' css-file should never be included before the 'main' css,
> that would make absolutely no sense! The idea suggests that the global css
> is more important than the specific css for a particular component!?!?
>
> But, if you really want to do so anyway, @Inject
> org.apache.tapestry5.RenderSupport and in any phase that runs after the body
> is rendered (@AfterBody for instance) user rendersupport to add the
> stylesheet. Not pretty, but it works :) I still remember when I used this
> because there was no annotation for adding stylesheets ;)
>
> Cheers,
>
> Martin
>
>
> Gunnar Eketrapp wrote:
>
>> With an annotaion in the border component class.
>>
>> E.g.
>>
>> @IncludeStylesheet("context:layout/css/main.css")
>>
>> ... and the page specific as an annotion in the page class ...
>>
>> E.g.
>> @IncludeStylesheet("context:css/page.css")
>>
>>
>> 2009/10/15 cordenier christophe <ch...@gmail.com>
>>
>>
>>
>>> Hello
>>> How do you include the main css file ?
>>>
>>> Regards
>>> Christophe.
>>>
>>> 2009/10/15 Gunnar Eketrapp <gu...@gmail.com>
>>>
>>>
>>>
>>>> Please anyone!
>>>>
>>>> My T5'ed version of the page differs from the HTML designers version and
>>>>
>>>>
>>> I
>>>
>>>
>>>> really suspect the ordering of the CSS includes to be the reason.
>>>>
>>>> So how do I add a page specific CSS include after the border component
>>>> includes.
>>>>
>>>> Or am I stupid?
>>>>
>>>> Thanks in advance!
>>>>
>>>>
>>>> 2009/10/15 Gunnar Eketrapp <gu...@gmail.com>
>>>>
>>>>
>>>>
>>>>> Hi!
>>>>>
>>>>> I am porting an app that have some page specific CSS files.
>>>>>
>>>>> I added these in the page class files as ....
>>>>>
>>>>> @IncludeStylesheet
>>>>>
>>>>> ... annotations.
>>>>>
>>>>> I also have a border component that includes the main CSS file.
>>>>>
>>>>> My question now is how do I get the main CSS to be loaded before the
>>>>>
>>>>>
>>>> page
>>>
>>>
>>>> specific CSS.
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> Gunnar Eketrapp
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>>>> Allévägen 2A, 132 42 Saltsjö-Boo
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

Re: T5 / Include file ordering

Posted by Martin Reurings <ma...@windgazer.nl>.
TBH, a 'component' css-file should never be included before the 'main' 
css, that would make absolutely no sense! The idea suggests that the 
global css is more important than the specific css for a particular 
component!?!?

But, if you really want to do so anyway, @Inject 
org.apache.tapestry5.RenderSupport and in any phase that runs after the 
body is rendered (@AfterBody for instance) user rendersupport to add the 
stylesheet. Not pretty, but it works :) I still remember when I used 
this because there was no annotation for adding stylesheets ;)

Cheers,

 Martin

Gunnar Eketrapp wrote:
> With an annotaion in the border component class.
>
> E.g.
>
> @IncludeStylesheet("context:layout/css/main.css")
>
> ... and the page specific as an annotion in the page class ...
>
> E.g.
> @IncludeStylesheet("context:css/page.css")
>
>
> 2009/10/15 cordenier christophe <ch...@gmail.com>
>
>   
>> Hello
>> How do you include the main css file ?
>>
>> Regards
>> Christophe.
>>
>> 2009/10/15 Gunnar Eketrapp <gu...@gmail.com>
>>
>>     
>>> Please anyone!
>>>
>>> My T5'ed version of the page differs from the HTML designers version and
>>>       
>> I
>>     
>>> really suspect the ordering of the CSS includes to be the reason.
>>>
>>> So how do I add a page specific CSS include after the border component
>>> includes.
>>>
>>> Or am I stupid?
>>>
>>> Thanks in advance!
>>>
>>>
>>> 2009/10/15 Gunnar Eketrapp <gu...@gmail.com>
>>>
>>>       
>>>> Hi!
>>>>
>>>> I am porting an app that have some page specific CSS files.
>>>>
>>>> I added these in the page class files as ....
>>>>
>>>> @IncludeStylesheet
>>>>
>>>> ... annotations.
>>>>
>>>> I also have a border component that includes the main CSS file.
>>>>
>>>> My question now is how do I get the main CSS to be loaded before the
>>>>         
>> page
>>     
>>>> specific CSS.
>>>>
>>>>
>>>> Thanks in advance,
>>>> Gunnar Eketrapp
>>>>
>>>>
>>>>         
>>> --
>>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>>> Allévägen 2A, 132 42 Saltsjö-Boo
>>>
>>>       
>
>
>
>   

Re: T5 / Include file ordering

Posted by Gunnar Eketrapp <gu...@gmail.com>.
With an annotaion in the border component class.

E.g.

@IncludeStylesheet("context:layout/css/main.css")

... and the page specific as an annotion in the page class ...

E.g.
@IncludeStylesheet("context:css/page.css")


2009/10/15 cordenier christophe <ch...@gmail.com>

> Hello
> How do you include the main css file ?
>
> Regards
> Christophe.
>
> 2009/10/15 Gunnar Eketrapp <gu...@gmail.com>
>
> > Please anyone!
> >
> > My T5'ed version of the page differs from the HTML designers version and
> I
> > really suspect the ordering of the CSS includes to be the reason.
> >
> > So how do I add a page specific CSS include after the border component
> > includes.
> >
> > Or am I stupid?
> >
> > Thanks in advance!
> >
> >
> > 2009/10/15 Gunnar Eketrapp <gu...@gmail.com>
> >
> > > Hi!
> > >
> > > I am porting an app that have some page specific CSS files.
> > >
> > > I added these in the page class files as ....
> > >
> > > @IncludeStylesheet
> > >
> > > ... annotations.
> > >
> > > I also have a border component that includes the main CSS file.
> > >
> > > My question now is how do I get the main CSS to be loaded before the
> page
> > > specific CSS.
> > >
> > >
> > > Thanks in advance,
> > > Gunnar Eketrapp
> > >
> > >
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> > Allévägen 2A, 132 42 Saltsjö-Boo
> >
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

Re: T5 / Include file ordering

Posted by cordenier christophe <ch...@gmail.com>.
Hello
How do you include the main css file ?

Regards
Christophe.

2009/10/15 Gunnar Eketrapp <gu...@gmail.com>

> Please anyone!
>
> My T5'ed version of the page differs from the HTML designers version and I
> really suspect the ordering of the CSS includes to be the reason.
>
> So how do I add a page specific CSS include after the border component
> includes.
>
> Or am I stupid?
>
> Thanks in advance!
>
>
> 2009/10/15 Gunnar Eketrapp <gu...@gmail.com>
>
> > Hi!
> >
> > I am porting an app that have some page specific CSS files.
> >
> > I added these in the page class files as ....
> >
> > @IncludeStylesheet
> >
> > ... annotations.
> >
> > I also have a border component that includes the main CSS file.
> >
> > My question now is how do I get the main CSS to be loaded before the page
> > specific CSS.
> >
> >
> > Thanks in advance,
> > Gunnar Eketrapp
> >
> >
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>

Re: T5 / Include file ordering

Posted by Gunnar Eketrapp <gu...@gmail.com>.
Please anyone!

My T5'ed version of the page differs from the HTML designers version and I
really suspect the ordering of the CSS includes to be the reason.

So how do I add a page specific CSS include after the border component
includes.

Or am I stupid?

Thanks in advance!


2009/10/15 Gunnar Eketrapp <gu...@gmail.com>

> Hi!
>
> I am porting an app that have some page specific CSS files.
>
> I added these in the page class files as ....
>
> @IncludeStylesheet
>
> ... annotations.
>
> I also have a border component that includes the main CSS file.
>
> My question now is how do I get the main CSS to be loaded before the page
> specific CSS.
>
>
> Thanks in advance,
> Gunnar Eketrapp
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo