Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 34777 invoked from network); 4 Jun 2004 09:42:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Jun 2004 09:42:40 -0000 Received: (qmail 55650 invoked by uid 500); 4 Jun 2004 09:42:43 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 55632 invoked by uid 500); 4 Jun 2004 09:42:42 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 55618 invoked by uid 99); 4 Jun 2004 09:42:42 -0000 Received: from [216.254.0.202] (HELO mail2.speakeasy.net) (216.254.0.202) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 04 Jun 2004 02:42:42 -0700 Received: (qmail 4929 invoked from network); 4 Jun 2004 09:42:00 -0000 Received: from dsl017-064-097.wdc1.dsl.speakeasy.net (HELO GOLEM) (jhertz@[69.17.64.97]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 4 Jun 2004 09:41:59 -0000 From: "Joe Hertz" To: "'Struts Users Mailing List'" , Subject: RE: How appropriately access message-resources from Form classes?? Date: Fri, 4 Jun 2004 05:40:45 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 In-Reply-To: Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Call me nosy here, What sort of values would you want internationalized this way? I would think that the parameters should be just that -- parameters. Essentially you "should" be trying to fill in the blank in some string. At least that's what the framework envisions... Ex: My name is {0} Or Me llamo es {0} Does it matter to your app if {0} is Joe or Jose'? Is it not something you can handle in the message text itself? Kind of curious now... -Joe > -----Original Message----- > From: Cosyns Xavier [mailto:xcosyns@noctis.be] > Sent: Friday, June 04, 2004 5:23 AM > To: Struts Users Mailing List > Subject: How appropriately access message-resources from Form > classes?? > > > Hi, > > I want to do some custom validation inside my ValidatorForm > but encountered some problems in displaying in a > 'struts-recommended way' my error messages. > > From inside a ValidatorForm I can not find a way to access > the resource bundles configured in the struts config file. I > need it because I want to create an actionError with > internationalized arguments. > > Something like this: > ActionError("my.error.key", getResourceValue("my.first.arg.key"), > getResourceValue("my.second.arg.key")); > > But I do not know how to access my properties in a 'struts' > way inside my ValidatorForm. > > With Action there are no problems as we have a getResources() method. > > Does anyone have some idea about this, > > Thanks, > > Cosyns Xavier, > ______________________________ > xcosyns@inveo.be > > InveO Consulting & Development > Av. E. de Beco 112 > 1050 Ixelles > Tel: +32 2 648 74 32 > Fax: +32 2 648 87 64 > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org