You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anthony Martin <An...@TRAMS.com> on 2002/09/27 04:58:11 UTC

Globals

Is it now recommended to use members of Global like in Global.ERROR_KEY
instead of Action.ERROR_KEY *even* in classes that extend Action?  I know
these members have not been marked as deprecated, but the note seems to
indecate that they are preferred:

"Global manifest constants for the entire Struts Framework. Many of these
constants were initially defined in Action, but were moved here so that they
could be referenced without referencing the Action class itself. For
backwards compatibility, constant references there point at this class, and
the constant values themselves have not changed."

So, it looks like either way is acceptable.  But will the old way be
deprecated sometime in the future?


Anthony

"The project purpose statement you wrote and understand will be seen
differently by everyone else." - Immutable Laws of Project Management

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Globals

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 26 Sep 2002, Anthony Martin wrote:

> Date: Thu, 26 Sep 2002 19:58:11 -0700
> From: Anthony Martin <An...@TRAMS.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: "Struts User List (E-mail)" <st...@jakarta.apache.org>
> Subject: Globals
>
> Is it now recommended to use members of Global like in Global.ERROR_KEY
> instead of Action.ERROR_KEY *even* in classes that extend Action?  I know
> these members have not been marked as deprecated, but the note seems to
> indecate that they are preferred:
>
> "Global manifest constants for the entire Struts Framework. Many of these
> constants were initially defined in Action, but were moved here so that they
> could be referenced without referencing the Action class itself. For
> backwards compatibility, constant references there point at this class, and
> the constant values themselves have not changed."
>
> So, it looks like either way is acceptable.  But will the old way be
> deprecated sometime in the future?
>

The old way is likely to be deprecated in the future, but not in 1.1.

I made a mistake originally in defining these constants in Action.java
instead of in their own class, but there's no going back now (by removing
them from Action).  And there is now a new flood of books that talks about
using Action based constants, so it seems impolite of us to deprecate them
in a 1.1 time frame ...

>
> Anthony
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>