I want to share mine :^)

[...]

 /* Guardo los mensajes */
 PropertyMessageResources messages =
(PropertyMessageResources)request.getAttribute("org.apache.struts.action.MES
SAGE");
 Locale locale = (Locale)session.getAttribute(Globals.LOCALE_KEY);

[...]

 this.seleccio =
messages.getMessage(locale,"etiqueta.enregistramentPersonal.intern");


is it correct?

----- Original Message ----- 
From: "None None" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 12, 2004 10:11 PM
Subject: Re: Accessing ResourceBundle items from Action class


> (in my best StrongBad voice)... That's right, bow to my awesome
> superiorityness ;)
>
> Seriously though, I've been getting a ton of help from people on this list
> the past few days as I go through the exercise of learning Struts, so if I
> can give back even a little, that's very cool in my book.
>
> >From: Riyad Kalla <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Accessing ResourceBundle items from Action class
> >Date: Wed, 12 May 2004 13:05:50 -0700
> >
> >On Wednesday 12 May 2004 01:04 pm, None None wrote:
> > > Thank you for that answer Riyad.  I think I actually found another
> > > (better?) way in my stumbling about trying to solve it on my own...
> >
> >No you didn't, mine is the BEST :*D
> >
> > >
> > > All I did is in my Action, after all my real processing, is this:
> > >
> > > MessageResources mr = getResources(request);
> > > lpcaf.setMessage(mr.getMessage("messages.deleteFailed"));
> > >
> > > where lpcaf is the ActionForm from the form submission.  That seems to
> >do
> > > precisely what I want.
> >
> >oh... yea your way IS better! Thanks for sharing, now I know.
> >
> >Best,
> >Riyad
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _________________________________________________________________
> Getting married? Find tips, tools and the latest trends at MSN Life
Events.
> http://lifeevents.msn.com/category.aspx?cid=married
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to