Re: [Webwork-devel] Validation on commands?
Brought to you by:
baldree,
rickardoberg
From: Maurice P. <Ma...@Vi...> - 2002-03-11 14:18:26
|
Hey, On Monday, March 11, 2002, at 07:37 AM, Rickard wrote: >> I think the action designer can choose to call doValidation (or validate) >> when they feel it is appropriate. If they want the blanket validation, >> it is trivial to add to an ActionSupport subclass, however if it is >> embedded as the default behavior, then the options narrow. > > > Ok, so in your view we should remove the call to validate() entirely from > execute()? I.e. it should always be explicit whether validation is used > or not? I can see your point.. it would make things much more explicit. > > This is a big decision... what are other's opinion on this? -1 This would break a lot of code that has relied on this behavior. I don't use Commands, so I don't have the same validation issues that you get with Commands. I simply don't implement doValidation() on Actions I don't want to validate. But if you remove validate() from execute() lots of my code has to be updated to go and explicitly call doValidate(). I'm sure there are others that will have the same problem. -Maurice |