Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 6820 invoked from network); 24 Feb 2009 16:28:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Feb 2009 16:28:16 -0000 Received: (qmail 30198 invoked by uid 500); 24 Feb 2009 16:28:12 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 30173 invoked by uid 500); 24 Feb 2009 16:28:12 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 30164 invoked by uid 99); 24 Feb 2009 16:28:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Feb 2009 08:28:12 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of matt.faces@gmail.com designates 74.125.46.154 as permitted sender) Received: from [74.125.46.154] (HELO yw-out-1718.google.com) (74.125.46.154) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Feb 2009 16:28:04 +0000 Received: by yw-out-1718.google.com with SMTP id 4so1252512ywq.36 for ; Tue, 24 Feb 2009 08:27:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=dmM4oRTs/Xo8P2bxXATx/fzFCqW12ZX5xLS+1KbP9Uo=; b=xJGP0y2YymVs+7wc6zMg3p+Ac6oxPx8QKAkxnnvVH/s2uBn5n2ghoGdQz8SRrmb4HD 6kRb5S1t8JcWZ9xpMYLsToubiupHK9/FLtrBdMWEtByxmfzPnIdb48uf0vPC5Y7uaedA ktelfW8sK7OUInaboiZJuEX4C7JeMCk8HE6js= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=lLrE9Isnv0amLcwOQB6XOhLssbzZEJ10iuNHgHrUcEvwmGBiSVQVrhGLHk/mAV4zlS txQFs15PeC6e+KtbhVmBDLMarf+CcnmaQaUfJvUePBxqvLU4pkLNR1ThSvaYOSWyuGWF f2VwXbrr/5VLCE3M8iVYUGydSnRg6ccMFjHgU= MIME-Version: 1.0 Sender: matt.faces@gmail.com Received: by 10.142.242.8 with SMTP id p8mr2618693wfh.25.1235492863377; Tue, 24 Feb 2009 08:27:43 -0800 (PST) In-Reply-To: References: <8e9490260902240811j54b7cbbdy99b4273b733b3299@mail.gmail.com> Date: Tue, 24 Feb 2009 09:27:43 -0700 X-Google-Sender-Auth: ece8020afc0f11fa Message-ID: Subject: Re: [Trinidad] Can I see which skin should get / is selected? From: Matt Cooper To: MyFaces Discussion Content-Type: multipart/alternative; boundary=000e0cd32af03e81f60463ac9903 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd32af03e81f60463ac9903 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In Java code, you can also use the RenderingContextto get the active Skinobject: 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 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: > > > > Regards, > Matt > > On Tue, Feb 24, 2009 at 9:11 AM, Lars Vogel 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 >> >> >> >> >> true >> default >> aqua >> >> >> trinidad-skins.xml >> >> >> >> >> aqua.desktop >> aqua >> >> org.apache.myfaces.trinidad.desktop >> >> skins/aqua/aqua.css >> >> >> >> >> My directory under WebContent >> skins/aqua/aqua.css >> >> body { >> background-color: aqua; >> } >> >> .AFDefaultFontFamily:alias { >> font-family: cursive; >> } >> >> >> > --000e0cd32af03e81f60463ac9903 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable In Java code, you can also use the RenderingContext to get the active Skin object:

RenderingContext.getCurrentInstance().getSkin();

From that you c= an get the skin family or skin ID.

Regards,
Matt

On Tue, F= eb 24, 2009 at 9:22 AM, Matt Cooper <mcooper@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
&g= t;
> On Tue, Feb 24, 2009 at 9:11 AM, Lars Vogel <lars.vogel@googlemail.com> wrote:
>> Hi,
>>
>> I try to create a small example for sk= inning with JSF 1.2 Trinidad. I
>> follow: http://myfaces.apache.org/tr= inidad/devguide/skinning.html and tried
>> a few other resources.
>>
>> Details on my confi= guration below in case someone is interested. My question
>> is: H= ow can I see which skin should be selected and how can I see which skin
>> is selected?
>>
>> I looked at the logfile durin= g the Tomcat startup and cannot find a
>> reference which skin sho= uld get selected. I believe this would help me in
>> setting up th= e example because in this case I could narrow down my error.
>>
>> Best regards, Lars
>>
>>
>>= trinidad-config.xml
>>
>> <?xml version=3D"1.0&q= uot;?>
>> <trinidad-config xmlns=3D"http://myfaces.apache.org/trinidad/confi= g">
>> =A0=A0=A0 <!-- Enable debug output -->
>> =A0=A0=A0= <debug-output>true</debug-output>
>> =A0=A0=A0 <ac= cessibility-mode>default</accessibility-mode>
>> =A0=A0= =A0 <skin-family>aqua</skin-family>
>> </trinidad-config>
>>
>> trinidad-skins.xm= l
>>
>> <?xml version=3D"1.0" encoding=3D&qu= ot;ISO-8859-1"?>
>> <skins xmlns=3D"http://myfaces.apache.org/trinidad/sk= in">
>> =A0=A0=A0 <skin>
>> =A0=A0=A0 =A0=A0=A0 <id>a= qua.desktop</id>
>> =A0=A0=A0 =A0=A0=A0 <family>aqua&l= t;/family>
>> =A0=A0=A0 =A0=A0=A0 <render-kit-id>
>= > =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 org.apache.myfaces.trinidad.desktop
>> </render-kit-id>
>> =A0=A0=A0 =A0=A0=A0 <style-s= heet-name>skins/aqua/aqua.css
>> =A0=A0=A0 =A0=A0=A0 </style= -sheet-name>
>> =A0=A0=A0 </skin>
>> </skins&= gt;
>>
>> My directory under WebContent
>> skins/aqua/aqua.css
>>
>> body {
>> =A0= =A0=A0 background-color: aqua;
>> }
>>
>> .AFDef= aultFontFamily:alias {
>> =A0=A0=A0 font-family: cursive;
>&= gt; }
>>
>>
>>
>

--000e0cd32af03e81f60463ac9903--