You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Lars Vogel <la...@googlemail.com> on 2009/02/24 17:11:40 UTC
[Trinidad] Can I see which skin should get / is selected?
Hi,
I try to create a small example for skinning with JSF 1.2 Trinidad. I
follow: http://myfaces.apache.org/trinidad/devguide/skinning.html and tried
a few other resources.
Details on my configuration below in case someone is interested. My question
is: How can I see which skin should be selected and how can I see which skin
is selected?
I looked at the logfile during the Tomcat startup and cannot find a
reference which skin should get selected. I believe this would help me in
setting up the example because in this case I could narrow down my error.
Best regards, Lars
trinidad-config.xml
<?xml version="1.0"?>
<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
<!-- Enable debug output -->
<debug-output>true</debug-output>
<accessibility-mode>default</accessibility-mode>
<skin-family>aqua</skin-family>
</trinidad-config>
trinidad-skins.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
<skin>
<id>aqua.desktop</id>
<family>aqua</family>
<render-kit-id>
org.apache.myfaces.trinidad.desktop
</render-kit-id>
<style-sheet-name>skins/aqua/aqua.css
</style-sheet-name>
</skin>
</skins>
My directory under WebContent
skins/aqua/aqua.css
body {
background-color: aqua;
}
.AFDefaultFontFamily:alias {
font-family: cursive;
}
Re: [Trinidad] Can I see which skin should get / is selected?
Posted by Lars Vogel <la...@googlemail.com>.
Hi Matt,
cool, thank you.
Best regards, Lars
2009/2/24 Matt Cooper <mc...@apache.org>
> In Java code, you can also use the RenderingContext<http://myfaces.apache.org/trinidad/trinidad-1_2/trinidad-api/apidocs/org/apache/myfaces/trinidad/context/RenderingContext.html>to get the active
> Skin<http://myfaces.apache.org/trinidad/trinidad-1_2/trinidad-api/apidocs/org/apache/myfaces/trinidad/skin/Skin.html>object:
>
> RenderingContext.getCurrentInstance().getSkin();
>
> From that you can get the skin family or skin ID.
>
> Regards,
> Matt
>
>
> On Tue, Feb 24, 2009 at 9:22 AM, Matt Cooper <mc...@apache.org> wrote:
> > Hi Lars,
> >
> > If you view the page source, you can see what the active skin is.
> >
> > For example if you go to:
> > http://www.irian.at/trinidad-demo/faces/index.jspx
> >
> > it shows the following at the bottom of the page's source:
> >
> > <!--Created by Apache Trinidad (Apache MyFaces Trinidad API -
> > 1.0.8-SNAPSHOT/Apache MyFaces Trinidad Impl - 1.0.8-SNAPSHOT),
> > skin:minimal.desktop-->
> >
> > Regards,
> > Matt
> >
> > On Tue, Feb 24, 2009 at 9:11 AM, Lars Vogel <la...@googlemail.com>
> wrote:
> >> Hi,
> >>
> >> I try to create a small example for skinning with JSF 1.2 Trinidad. I
> >> follow: http://myfaces.apache.org/trinidad/devguide/skinning.html and
> tried
> >> a few other resources.
> >>
> >> Details on my configuration below in case someone is interested. My
> question
> >> is: How can I see which skin should be selected and how can I see which
> skin
> >> is selected?
> >>
> >> I looked at the logfile during the Tomcat startup and cannot find a
> >> reference which skin should get selected. I believe this would help me
> in
> >> setting up the example because in this case I could narrow down my
> error.
> >>
> >> Best regards, Lars
> >>
> >>
> >> trinidad-config.xml
> >>
> >> <?xml version="1.0"?>
> >> <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
> >> <!-- Enable debug output -->
> >> <debug-output>true</debug-output>
> >> <accessibility-mode>default</accessibility-mode>
> >> <skin-family>aqua</skin-family>
> >> </trinidad-config>
> >>
> >> trinidad-skins.xml
> >>
> >> <?xml version="1.0" encoding="ISO-8859-1"?>
> >> <skins xmlns="http://myfaces.apache.org/trinidad/skin">
> >> <skin>
> >> <id>aqua.desktop</id>
> >> <family>aqua</family>
> >> <render-kit-id>
> >> org.apache.myfaces.trinidad.desktop
> >> </render-kit-id>
> >> <style-sheet-name>skins/aqua/aqua.css
> >> </style-sheet-name>
> >> </skin>
> >> </skins>
> >>
> >> My directory under WebContent
> >> skins/aqua/aqua.css
> >>
> >> body {
> >> background-color: aqua;
> >> }
> >>
> >> .AFDefaultFontFamily:alias {
> >> font-family: cursive;
> >> }
> >>
> >>
> >>
> >
>
>
--
Lars
http://www.vogella.de - Tutorial about Java, Eclipse and Web programming
Re: [Trinidad] Can I see which skin should get / is selected?
Posted by Matt Cooper <mc...@apache.org>.
In Java code, you can also use the
RenderingContext<http://myfaces.apache.org/trinidad/trinidad-1_2/trinidad-api/apidocs/org/apache/myfaces/trinidad/context/RenderingContext.html>to
get the active
Skin<http://myfaces.apache.org/trinidad/trinidad-1_2/trinidad-api/apidocs/org/apache/myfaces/trinidad/skin/Skin.html>object:
RenderingContext.getCurrentInstance().getSkin();
>From that you can get the skin family or skin ID.
Regards,
Matt
On Tue, Feb 24, 2009 at 9:22 AM, Matt Cooper <mc...@apache.org> wrote:
> Hi Lars,
>
> If you view the page source, you can see what the active skin is.
>
> For example if you go to:
> http://www.irian.at/trinidad-demo/faces/index.jspx
>
> it shows the following at the bottom of the page's source:
>
> <!--Created by Apache Trinidad (Apache MyFaces Trinidad API -
> 1.0.8-SNAPSHOT/Apache MyFaces Trinidad Impl - 1.0.8-SNAPSHOT),
> skin:minimal.desktop-->
>
> Regards,
> Matt
>
> On Tue, Feb 24, 2009 at 9:11 AM, Lars Vogel <la...@googlemail.com>
wrote:
>> Hi,
>>
>> I try to create a small example for skinning with JSF 1.2 Trinidad. I
>> follow: http://myfaces.apache.org/trinidad/devguide/skinning.html and
tried
>> a few other resources.
>>
>> Details on my configuration below in case someone is interested. My
question
>> is: How can I see which skin should be selected and how can I see which
skin
>> is selected?
>>
>> I looked at the logfile during the Tomcat startup and cannot find a
>> reference which skin should get selected. I believe this would help me in
>> setting up the example because in this case I could narrow down my error.
>>
>> Best regards, Lars
>>
>>
>> trinidad-config.xml
>>
>> <?xml version="1.0"?>
>> <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
>> <!-- Enable debug output -->
>> <debug-output>true</debug-output>
>> <accessibility-mode>default</accessibility-mode>
>> <skin-family>aqua</skin-family>
>> </trinidad-config>
>>
>> trinidad-skins.xml
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <skins xmlns="http://myfaces.apache.org/trinidad/skin">
>> <skin>
>> <id>aqua.desktop</id>
>> <family>aqua</family>
>> <render-kit-id>
>> org.apache.myfaces.trinidad.desktop
>> </render-kit-id>
>> <style-sheet-name>skins/aqua/aqua.css
>> </style-sheet-name>
>> </skin>
>> </skins>
>>
>> My directory under WebContent
>> skins/aqua/aqua.css
>>
>> body {
>> background-color: aqua;
>> }
>>
>> .AFDefaultFontFamily:alias {
>> font-family: cursive;
>> }
>>
>>
>>
>
Re: [Trinidad] Can I see which skin should get / is selected?
Posted by Matt Cooper <mc...@apache.org>.
Hi Lars,
If you view the page source, you can see what the active skin is.
For example if you go to:
http://www.irian.at/trinidad-demo/faces/index.jspx
it shows the following at the bottom of the page's source:
<!--Created by Apache Trinidad (Apache MyFaces Trinidad API -
1.0.8-SNAPSHOT/Apache MyFaces Trinidad Impl - 1.0.8-SNAPSHOT),
skin:minimal.desktop-->
Regards,
Matt
On Tue, Feb 24, 2009 at 9:11 AM, Lars Vogel <la...@googlemail.com> wrote:
> Hi,
>
> I try to create a small example for skinning with JSF 1.2 Trinidad. I
> follow: http://myfaces.apache.org/trinidad/devguide/skinning.html and tried
> a few other resources.
>
> Details on my configuration below in case someone is interested. My question
> is: How can I see which skin should be selected and how can I see which skin
> is selected?
>
> I looked at the logfile during the Tomcat startup and cannot find a
> reference which skin should get selected. I believe this would help me in
> setting up the example because in this case I could narrow down my error.
>
> Best regards, Lars
>
>
> trinidad-config.xml
>
> <?xml version="1.0"?>
> <trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
> <!-- Enable debug output -->
> <debug-output>true</debug-output>
> <accessibility-mode>default</accessibility-mode>
> <skin-family>aqua</skin-family>
> </trinidad-config>
>
> trinidad-skins.xml
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <skins xmlns="http://myfaces.apache.org/trinidad/skin">
> <skin>
> <id>aqua.desktop</id>
> <family>aqua</family>
> <render-kit-id>
> org.apache.myfaces.trinidad.desktop
> </render-kit-id>
> <style-sheet-name>skins/aqua/aqua.css
> </style-sheet-name>
> </skin>
> </skins>
>
> My directory under WebContent
> skins/aqua/aqua.css
>
> body {
> background-color: aqua;
> }
>
> .AFDefaultFontFamily:alias {
> font-family: cursive;
> }
>
>
>