Leandro Melo
SCJP 1.4, SCWCD 1.4
Originally posted by Jason Menard:
I prefer to place a method like that in a separate helper class as opposed to the Action. I would never put something like that in an ActionForm.
An ActionForm represents an HTML form that the user interacts with over one or more pages.
If you nest an existing bean instance on your form, think about the properties it exposes. Any public property on an ActionForm that accepts a single String value can be set with a query string. It may be useful to place beans that can affect the business state inside a thin "wrapper" that exposes only the properties required. This wrapper can also provide a filter to be sure runtime properties are not set to inappropriate values.
An ActionForm represents an HTML form that the user interacts with over one or more pages.
Leandro Melo
SCJP 1.4, SCWCD 1.4
Originally posted by Jason Menard:
The ActionForm certainly has no references to the helper or other wise calls any methods on it. On the other hand, the helper could certainly be dependant on the ActionForm and model though. Even that's not a certanity if your helper is something along the lines of BeanUtils.
Leandro Melo
SCJP 1.4, SCWCD 1.4
Originally posted by Leandro Melo:
I don't get how the ActionForm would use a helper class if it doesn't call methods on it. Can you give a better explanation on this?
I want my playground back. Here, I'll give you this tiny ad for it:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|