struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taylor, Jason" <jtay...@cobaltgroup.com>
Subject RE: getting MessageResources within ActionForm.reset()
Date Sat, 21 Sep 2002 19:21:21 GMT
Because I have a dynamic array of checkboxes which must be created in
reset() before the controller automatically populates the ActionForm.  If I
don't do the initialization in reset(), I can't use the controller to
initialize, populate and validate the form, and I may as well not use an
ActionForm.

Bottom line, there should be a way to get Resources in ActionForm.reset()--
there's no good reason I can see why you'd need system properties in the
Action class but not the ActionForm class.  The reset method receives the
request object, so you don't have the problem that the deprecated
ActionServlet.getResources() method had (i.e., no request argument to
indicate *which* bundle you want).

What I would like to know is why the deprecated method wasn't replaced with
ActionServlet.getResources(HttpServletRequest) rather than
Action.getResources(HttpServletRequest).

Anyone know of any way to get Resources within the ActionForm before I post
it to struts-dev?

-JT

-----Original Message-----
From: Bryan Hilterbrand [mailto:Bryan.Hilterbrand@bullwinkle.net]
Sent: Saturday, September 21, 2002 11:29 AM
To: Struts Users Mailing List
Subject: Re: getting MessageResources within ActionForm.reset()


Why don't you do your initialization in the action method?

Bryan

----- Original Message ----- 
From: "Taylor, Jason" <jtaylor@cobaltgroup.com>
To: <struts-user@jakarta.apache.org>
Sent: Saturday, September 21, 2002 12:06 PM
Subject: getting MessageResources within ActionForm.reset()


Since the ActionServlet.getResources() method is now deprecated, you need a
request and an Action object to get Resources.  That's fine so long as
you're operating within the Action class, but if you're in the ActionForm
object and you want to get Resources, you can't because
Action.getResources(HttpServletRequest) has protected access.  
 
Am I missing something or is this a job for struts-dev?
 
-JT



--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message