Re: get ResourceBundle in ActionForm subclass

2006-05-24 Thread Jorge Martín Cuervo
Thanks to all, this is a working solution, but i didn't want to instantiate another ResourceBundle, struts already have one. I solve the problem after i check the struts source: [...] if (orgName == null || orgName.equals("")) { //errors.add("orgName", new ActionMessage("employer.orgNam

Re: get ResourceBundle in ActionForm subclass

2006-05-24 Thread Vinit Sharma
Load resource bundle and get the message from bundle: ResourceBundle labels = ResourceBundle.getBundle( "properties/ApplicationResources", (Locale) request.getSession().getAttribute( Globals.LOCALE_KEY)); String orgName = labels.getString("employer.orgNam

Re: get ResourceBundle in ActionForm subclass

2006-05-24 Thread navin mca
Hi, Follow these steps. 1. Define ApllicationResources_locale specific property file. 2. add the message keys to thse different locale specific property file. 3. in Jsp file set the locale based on the reuest parameters. with wrote: Hi all, i want to use externa

RE: get ResourceBundle in ActionForm subclass

2006-05-22 Thread Jorge Martín Cuervo
MessageResources messageResources = getResources(request); > > messageResources.getMessage(locale, "lbl.payout"); > > > > >From: Jorge Martn Cuervo <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: user@stru

RE: get ResourceBundle in ActionForm subclass

2006-05-22 Thread fea jabi
ts.apache.org Subject: get ResourceBundle in ActionForm subclass Date: 22 May 2006 16:13:46 +0200 Hi all, i want to use externalized messages in the validation errors of a ActionForm subclass. I have this code: [...] public ActionErrors validate(ActionMapping mapping,

get ResourceBundle in ActionForm subclass

2006-05-22 Thread Jorge Martín Cuervo
Hi all, i want to use externalized messages in the validation errors of a ActionForm subclass. I have this code: [...] public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); /*