Re: [Webwork-devel] Validation on commands?
Brought to you by:
baldree,
rickardoberg
From: <Jim...@do...> - 2002-03-11 13:30:49
|
-1 I'm against hardcoding validation on every command action=20 indescriminately. But then again, I'm against hardcoding validation check=20 in doExecute. From a practical standpoint, many of us who use the=20 CommandDriven design, do so in order to "setup" a page. This is a very=20 common step with no need for validation. Putting an extraneous check in=20 these cases does not feel like good design. I think the action designer can choose to call doValidation (or validate)=20 when they feel it is appropriate. If they want the blanket validation, it=20 is trivial to add to an ActionSupport subclass, however if it is embedded=20 as the default behavior, then the options narrow.=20 jim Rickard <ri...@mi...> Sent by: web...@li... 03/11/2002 04:24 AM =20 To: WebWork Development <web...@li...> cc:=20 Subject: [Webwork-devel] Validation on commands? Hey What was the result of our discussions re: validating data on commands=20 as well? I recall that we said that it would be a good idea to call=20 validation() regardless of whether doExecute() or a command was to be=20 invoked. That's ok, but then all examples break since validation is called before=20 doDefault() is invoked. So, either the examples has to be updated so=20 that the validation rules are surrounded with if (!isCommand("default")) { .. } or, we could special-case the validation so that it's not done before=20 executing "default" but it's done on all other commands. What say ye? /Rickard --=20 Rickard =D6berg Author of "Mastering RMI" Chief Architect, TheServerSide.com The Middleware Company - We Build Experts! =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Webwork-devel mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webwork-devel |