A follow up to this thread.
I built my app using 1.1 and the O'Reilly book. Upon my upgrade, and prior
threads, I am getting some depreciated warnings when I compile. This seems to
be the problem:
ActionError newError =
new ActionError("global.error.login.requiredfield", userNameLabel );
errors.add(ActionErrors.GLOBAL_ERROR, newError);
It looks like I should starting using messages? I am not quite understanding
the change. Could someone give me some advice, so I could get these types of
calls changed to the new 1.2.4 calls?
Thanks,
Scott
-----Original Message-----
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 2:10 PM
To: Struts Users Mailing List
Subject: Re: MessageResources in ActionForm
The API change occurred with the 1.1 release. With that release,
Action.MESSAGES_KEY was deprecated, as well as other constants there.
Those deprecated items were removed in the 1.2 releases.
Hubert
> -----Original Message-----
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 1:51 PM
> To: Struts Users Mailing List; Hubert Rabago
> Subject: RE: MessageResources in ActionForm
>
>
> Is this an api change from 1.1? Does anyone know?
>
>
>
> -----Original Message-----
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 1:45 PM
> To: Struts Users Mailing List
> Subject: Re: MessageResources in ActionForm
>
>
> Use Globals.MESSAGES_KEY .
>
>
> On Mon, 28 Mar 2005 13:39:17 -0600, Scott Purcell
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I am trying to obtain a MessageResources object in a
> ActionForm and I cannot figure out how.
> >
> > Prior to the new 1.2.4 struts I used this:
> >
> > MessageResources resources =
> > (MessageResources)req.getAttribute( Action.MESSAGES_KEY );
> >
> > But it appears depreciated, or non existant in the action class now.
> >
> > Thanks,
> >
> > Scott K Purcell | Developer | VERTIS |
---------------------------------------------------------------------
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]