> -----Original Message----- > From: Scott McClure [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 03, 2004 10:50 AM > To: [EMAIL PROTECTED] > Subject: Design Questions > > > First, I was thinking about using a single UserForm to validate all > forms relating to a user, for instance. The problem is, is that some > fields would not be necessary for update actions and their validation > code would throw a ActionError with the default value. I could use > conditional validation in the ActionForm based upon the > ActionMapping, > but that would create ties between the config file and code that I am > not sure I want to make. What is your opinion?
In your load action, always fill out the entire form. As long as you session based form beans and don't use the reset (for checkboxes) the data will pass without input fields in the jsp. > > Next, I am trying to tackle the problem of the granularity of > my Action > objects. At first, I thought about using a DispatchAction, > but that only > allows me to use one ActionForm for all of the Actions in that class. > Then, I thought that maybe wildcards would solve my problem. > Wildcards, > though, seem like a security concern, where it would be theoretically > possible to run an action that is not intended to be run (to > exploit any > handling errors). Also, I am not sure if that solves any granularity > problems, but merely simplifies configuration in the config file. Are > there any other good solutions for solving granularity > problems? Did I > mis-understand DispatchAction? General comments on security with > wildcards would also be very interesting. I am a believer in standard actions and have your business classes implement interfaces for the actions to use. So in the save/update/delete sequence you have a single action which calls standard functions in your business classes. > > Also, slightly off-topic of my previous questions, what naming > conventions do people use for application messages? In struts I have > seen a general format of prompt.*, heading.*, and using page specific > messages under the page name. What are some suggestions? I want to > resolve to a naming standard now so I dont have to go through > and change > everything if it becomes a code managibilty concern. If you can name them <package>.<class>.<messageKey> or <url>.<field>.<messageKey> it works well as well. > > Thanks, > Scott > > Good luck Edgar --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

