[Opensource] Controller.getString() deprecated?

Michael Rimov rimovm at centercomp.com
Thu Aug 15 13:18:01 PDT 2002


At 01:58 AM 8/15/2002 -0300, you wrote:

>When I compile some controllers, I'm receiving an "deprecated" warning,
>so I compiled it with "-deprecation", and the message was:

Itamar,

That was a documentation bug in the old Expresso.  What it SHOULD say is 
ControllerResponse.getString().  The reason is that it allows getString to 
be set to that of each individual user's locale, and that is impossible 
with Controller.getString().

OTOH, I've actually removed the @deprecation warnings because there are 
some instances where it is impossible to use ControllerResponse.getString() 
and in reality you want the language of the system operator. [Like for 
controller state strings, etc]

Hope this clarifies! :)
                                         -Mike





>-----------------------------
>LoginController.java:60: warning: getString(java.lang.String) in
>com.jcorporate.expresso.core.controller.Controller has been deprecated
>                         dbContext.setLabel(getString("Context/Database_"));
>-----------------------------
>
>Actually, the JavaDoc says:
>
>-----------------------------
>com.jcorporate.expresso.core.controller.Controller
>
>(...)
>
>getString(String stringCode, Object[] args)
>           Deprecated. Use ControllerRequest.getString(String, Object[]
>instead, this is able to return the local language by considering the
>user as well.
>-----------------------------
>
>But at ControllerRequest there isn't a "getString()" method:
>
>-----------------------------
>src/controller/LoginController.java [60] cannot resolve symbol
>symbol  : method getString  (java.lang.String)
>location: class
>com.jcorporate.expresso.core.controller.ControllerRequest
>                       =20
>dbContext.setLabel(request.getString("Context/Database_"));
>-----------------------------
>
>I'm still using Controller.getString() for now, but how can I get rid of
>this "deprecated" message?
>
>Best regards,
>--=20




More information about the Opensource mailing list