From adffaces-user-return-15-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Thu Mar 30 16:05:45 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 83206 invoked from network); 30 Mar 2006 16:05:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Mar 2006 16:05:45 -0000 Received: (qmail 93288 invoked by uid 500); 30 Mar 2006 16:05:45 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 93262 invoked by uid 500); 30 Mar 2006 16:05:44 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 93253 invoked by uid 99); 30 Mar 2006 16:05:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2006 08:05:44 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of matt.faces@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO pproxy.gmail.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2006 08:05:43 -0800 Received: by pproxy.gmail.com with SMTP id d42so1487572pyd for ; Thu, 30 Mar 2006 08:05:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=X3kTF0zPO4jzVRswPJigvggx078xEhjggnKLu8zBWD3fb3oMAiLoe8cFrYq6YmJ7fOzxE6GXlHww8koLFHXuTVbr9igbV5qGn8QF7kQEcdncQKDfdvp6tRdDpp0BUpv7caJqaOVJAIGCT8oiX3R/eCLU+B3+taFz495pG4Y0rQI= Received: by 10.35.54.20 with SMTP id g20mr1277257pyk; Thu, 30 Mar 2006 08:05:22 -0800 (PST) Received: by 10.35.32.7 with HTTP; Thu, 30 Mar 2006 08:05:22 -0800 (PST) Message-ID: Date: Thu, 30 Mar 2006 09:05:22 -0700 From: "Matt Cooper" To: adffaces-user@incubator.apache.org Subject: Re: Images in custom style classes in Skin file In-Reply-To: <73B9C5C17D425D45B5CAA354C4E66C4A012B1127@cpbs-mxs1.cpbs.at> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7389_24368237.1143734722164" References: <73B9C5C17D425D45B5CAA354C4E66C4A012B1127@cpbs-mxs1.cpbs.at> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_7389_24368237.1143734722164 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Arti, Is that style a copy-and-paste directly? You might try inserting apostrophes around the image inside the URL like: background-image: url('/skins/myskins/skin_images/menuBarBackground.png'); Regards, Matt On 3/30/06, arti wrote: > > Hi Jonas, > > Yes, I have the same style class as mentioned in my previous mail > (copied below) > > > af|MyPanelBorder::center { > > background-image:url(/skins/myskins/skin_images/menuBarBackground.png) > > ; > > } > > and in my renderer, I have following code inside encodeBegin method > > // Render the CENTER area of panel > writer.startElement("tr", component); // Height 70% > writer.startElement("td", component); > writer.writeAttribute("class", MY_PANEL_BORDER_CENTER, "class"); > writer.endElement("td"); > writer.endElement("tr"); > > Where MY_PANEL_BORDER_CENTER is Style class name as it appears in the > generated CSS - defined as below > // Style class for CENTER from generated CSS > public static final String MY_PANEL_BORDER_CENTER =3D > "af_MyPanelBorder_center"; > > Surprisingly, the same image, with same relative path, is used in the > CSS for menuBar background, and it is shown in browser, on same page, > correctly. > > I see something tricky - My original CSS has URLs to many images. But > the generated CSS does not contain any image file names - except for > this image for my style class ("af|MyPanelBorder::center"). Still all > the images are being displayed correctly. > > I need to understand how the CSS is generated from the orginal source > CSS. If the generated CSS does not contain any images, how are those > images displayed in the browser? > > I have a separate discussion thread on this on JDeveloper forum (since I > was not aware of this forum before). Kindly check it for details. > http://forums.oracle.com/forums/thread.jspa?messageID=3D1255222� > > Thanks > Arti > > -----Original Message----- > From: Jonas Jacobi [mailto:jonas.jacobi@oracle.com] > Sent: Wednesday, March 29, 2006 8:38 PM > To: adffaces-user@incubator.apache.org > Subject: Re: Images in custom style classes in Skin file > > Hi Arti, > > Do you have a class for the center area? > Something like this: > > af|MyPanelBorderCenter::background-image > { > content:url(/skins/myskins/skin_images/menuBarBackground.png); > } > > > Thanks, > Jonas > > > arti wrote: > > Hi > > > > I want to understand how can we use images defined in custom style > > classes in Skin file? > > > > For example I have created a custom component "MyPanelBorder" which > > renders a table of differnet regions - Left, Right, Center etc. I am > > trying to add background-image to the Center region, by adding > > following class in the Skin file. But the image does not get displayed > > > in the browser. Neither can I see any tag when I say "view > > source". (Same image is displayed correctly in the MenuBar background > > on same page, it works). > > af|MyPanelBorder::center { > > background-image:url(/skins/myskins/skin_images/menuBarBackground.png) > > ; > > } > > > > Does my renderer have to explicitly write out a tag for this? If > > > so, how does my renderer read the Skin file and get the source URL of > > the image above? > > > > Thanks > > Arti > > > > > > -- > *Author*: Pro JSF and Ajax: Building Rich Internet Components > > *Blog*: http://www.orablogs.com/jjacobi > > > > > ------=_Part_7389_24368237.1143734722164--