Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 3507 invoked from network); 12 Aug 2008 10:15:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2008 10:15:03 -0000 Received: (qmail 19163 invoked by uid 500); 12 Aug 2008 10:14:58 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 18845 invoked by uid 500); 12 Aug 2008 10:14:56 -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 18834 invoked by uid 99); 12 Aug 2008 10:14:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 03:14:56 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mwessendorf@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 10:13:57 +0000 Received: by ug-out-1314.google.com with SMTP id m3so358084ugc.15 for ; Tue, 12 Aug 2008 03:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=Jm6Da+blsr5OiN53U22WyZCmLfI77kW3YYz8DZ9dMRo=; b=X1VWha4VhJLoEhfOlLEtghOcm/SRWxNIz4GNt0tbo0kvYplTbWUj4mSKb+mYOslQR0 FQXPfKeekPxQuRYoQXJrJS68KRpkmeQZN7T26NQvx7zps0w8/gGFFLf8aUEoOms7NP0U 3rQaTlERysRbCt2r9Ozu0fxxf8iS6J6OjrEZg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=hsMDE/HuK2oXPGz7LCIP8xrvo2j4S/7od1s1PD7ndAT5DP3BPurVMofR/n94dZVd6s yledcjK9u870tAFzRpo2tPEUdohkmuIQYnd+cYUz/ItILTN0afmauTk2EmG1hxd+yAQB q/MfggtmbBqDisMcx4RLeys+19XolR7PWpqPw= Received: by 10.66.232.9 with SMTP id e9mr3923296ugh.17.1218536064130; Tue, 12 Aug 2008 03:14:24 -0700 (PDT) Received: by 10.210.112.3 with HTTP; Tue, 12 Aug 2008 03:14:24 -0700 (PDT) Message-ID: <71235db40808120314v3edfd644wcb1202af3b699f73@mail.gmail.com> Date: Tue, 12 Aug 2008 12:14:24 +0200 From: "Matthias Wessendorf" Sender: mwessendorf@gmail.com To: "MyFaces Discussion" Subject: Re: [Trinidad] How to use one's own (Text) resources instead of the built-in ones In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: fbdefb83a2e7a25a X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Tue, Aug 12, 2008 at 12:02 PM, wrote: > > Hi, > > Regarding the use of our own text resources e.g. using our own label for > Trinidad's showDetail table label (whichin German we found to be too long.. > ;) > I suppose I could go any time to the trinidad JAR package and replace the > texts by our own ones. > > But this is not the way I would like. Rather, I would prefer a solution > where I could somehow redirect the classpath used by the ResourceServlet > to our own messages resources. Is there a setter method somewhere or how > would I accomplish that? You can see in the trinidad-skins.xml in the demo bundle how you can add a resource bundle name: purple.desktop purple org.apache.myfaces.trinidad.desktop skins/purple/purpleSkin.css org.apache.myfaces.trinidaddemo.resource.SkinBundle And the resource bundle code looks like this: package org.apache.myfaces.trinidaddemo.resource; import java.util.ListResourceBundle; public class SkinBundle extends ListResourceBundle { @Override public Object[][] getContents() { return _CONTENTS; } static private final Object[][] _CONTENTS = { {"af_tableSelectMany.SELECT_COLUMN_HEADER", "Select A Lot"}, {"af_tableSelectOne.SELECT_COLUMN_HEADER", "Select Just One"}, // add what ever "label" you want to replace }; } Greetings, Matthias > > Thanks a lot, > Wolfgang. -- Matthias Wessendorf Need JSF and Web 2.0? http://code.google.com/p/facesgoodies further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org