Re: The Future of Struts Validation?
Hi David, good to see the validator config being revamped. Here's my 2 cents: Instead of renaming form-bean I'd be inclined to rename it to 'validation' as that is what it is. I'd also be inclined to replace the 'depends' attribute with a collection of 1 or more elements that hold the validators to apply. Any overriding msg element could then be contained within these validator-application tags. This is the main area of the current validator descriptors that I have found causes confusion. Ie I'd argue for more structure to the new definition file that the current one provides. Make it clear (via containment) which piece of the definition applies to which objects instead of using references. I'd also like to see a Validator interface introduced. Ie instead of defining the class, method, params in the validator config, just define the class that implements Validator. I don't think this would be an onerous restriction on validator implementations and would seem to simplify the framework. William - Original Message - From: David Graham [EMAIL PROTECTED] To: Struts Developers List [EMAIL PROTECTED] Sent: Saturday, November 13, 2004 9:47 AM Subject: Re: The Future of Struts Validation? I've written a proposal for what Commons Validator 2.0 xml might look like here: http://jakarta.apache.org/commons/validator/validator_2_0_0_proposal.dtd It's an attempt to simplify things as well as make validator more flexible for web and non-web usage. Comments, criticisms, and suggestions are welcome! David --- William Ferguson [EMAIL PROTECTED] wrote: I posted his on the users list when I probably should have posted it here. So here' the repeat from those not lurking on both lists. I've create an enhancement on Bugzilla relating to this post at http://issues.apache.org/bugzilla/show_bug.cgi?id=32217. -- Now that I've had a year or so or heavy Struts use, I've come to believe that (IMHO) validation within Struts is a little less clear and concise than it could otherwise be with a few small changes. Currently, validation is defined by specifying a true/false value for the 'validate' attribute for an ActionMapping, and which validation to perform is defined by either the ActionMapping's (Form) 'name' or 'path' attribute depending on whether the Form extends from ValidatorActionForm or not. It seems to me that it would be clearer to introduce a 'validation' attribute into ActionMapping which defines the Id of the validation (if any) to perform. This would supercede the 'validate' attribute and removes the responsibility of identifying the validation target from the combination of the (Form) 'name' attribute and the ActionForm inheritance hierarchy. It also allows all the benefits of using (currently) using a ValidatorActionForm to validate based on ActionMapping path, plus those of using Form named mappings, while also allowing the freedom to mix, match and reuse validations across ActionMappings. It should be easy to make this new addition entirely backward compatible. Ie If 'validation' attribute is not found then look for current attributes and follow the existing validation path, at least for some deprecation period. Specifying no validation for an ActionMapping would be as simple as validation='None' with a validation entry for now speciying no fields. Once this refactoring has been achieved, it also opens up the possibility of further enhancing the existing validation mechanism. Ie Allowing validations to contain other validations etc. Though I would first start by simplifying the validation definitions, which I also find somewhat non-intuitive at times. Anyway, just my 2 cents. I'd like to thank the Struts development community for a pretty decent framework, especially those worked on Tiles - it really rocks! William Ferguson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug report for Struts [2004/11/14]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 866|New|Enh|2001-03-06|Clean Way to Add Parameters to Redirecting Forward| | 1598|Opn|Enh|2001-05-02|Textarea wrap-Attribute | | 3202|Opn|Enh|2001-08-21|OptionsTag.doEndTag - calls method to populate se| | 5157|Opn|Enh|2001-11-28|logic:iterate attributes inconsistent with rest of| | 5395|Opn|Enh|2001-12-12|ActionContext class | | 5739|Opn|Enh|2002-01-08|Struts fails silently in too many places | | 5937|New|Enh|2002-01-21|html:form trims all extensions| | 6686|New|Enh|2002-02-26|make action attribute of html:form tag optional | | 6847|Opn|Enh|2002-03-04|Multiple file upload not possible due to MultiPart| | 7892|Opn|Enh|2002-04-09|Using Multiple Resource Bundles for an Application| | 7902|Opn|Enh|2002-04-10|The exception handling declaration in the DTD does| | 9088|Opn|Enh|2002-05-15|FormTag.getActionMappingURL() assumes 1 servlet ma| | 9616|New|Enh|2002-06-05|Some more Struts docs | | 9748|New|Enh|2002-06-10|attribute labelKeyProperty for Options tag| |10550|New|Enh|2002-07-08|Delegate path-management to ActionForwards| |10551|Opn|Enh|2002-07-08|Allow a struts-config element to extend another | |10552|New|Enh|2002-07-08|create helper objects in struts-config| |10867|Opn|Enh|2002-07-16|Add indexedProperty attribute in html taglibs | |11154|Opn|Enh|2002-07-25|html:link tag extension for multiple parameters | |11733|Opn|Enh|2002-08-15|Make error keys more specific | |12170|Opn|Enh|2002-08-29|Added functionality when extending another definit| |12301|Opn|Enh|2002-09-04|nested:messages Tag does not work as expected | |12313|Opn|Enh|2002-09-04|Chaining of RequestProcessors--contribution | |12342|Ass|Enh|2002-09-05|Add default exception handler attribute to global| |12600|New|Enh|2002-09-12|html:form tag always prepends context path to acti| |13125|Opn|Enh|2002-09-30|Lack of character-set while using html:html ta| |13521|New|Enh|2002-10-11|CombinedDispatchAction| |13544|Opn|Enh|2002-10-11|[exception] support contextRelative paths | |13638|Opn|Enh|2002-10-15|add Config Factory| |14068|Opn|Enh|2002-10-29|Why can't I use forwards with exception elements i| |14071|Opn|Enh|2002-10-29|Need clear info on which Struts attributes produce| |14183|New|Enh|2002-11-01|html:img does not support forward attribute | |14749|Opn|Enh|2002-11-21|Action input not starting with '/' and not a val| |15023|Opn|Enh|2002-12-03|Use attribute 'id' instead of 'name' in html:form-| |15188|Opn|Enh|2002-12-09|roles attribute of tags and definitions only allow| |15422|Opn|Enh|2002-12-17|Form Tag exportFormName attribute| |15604|Opn|Enh|2002-12-22|Struts framework should use getInstance Method for| |15670|Opn|Enh|2002-12-26|Doc for exception element needs to mention page| |15673|Opn|Enh|2002-12-26|Default Action in ActionMapping | |15805|Opn|Enh|2003-01-05|Enhance ModuleException to allow getting chained E| |15816|Opn|Enh|2003-01-06|html:form focus in pages with several forms | |15849|Opn|Enh|2003-01-07|Incorrect documentation for Developing Your Own M| |15912|Opn|Enh|2003-01-09|Client-side validation fails if not all form-field| |15921|Opn|Enh|2003-01-09|Allow relative actions in struts-config.xml | |15935|Opn|Enh|2003-01-09|WSAD 5.0 Instructions for Struts Example | |15969|Opn|Enh|2003-01-10|Ability to use TilesRequestProcessor even if it no| |16074|New|Enh|2003-01-14|html:form uses 'action' not 'input' to select mapp| |16104|Opn|Enh|2003-01-15|default handler parameter value for LookupDispatch| |16107|Opn|Enh|2003-01-15|Configure if you want to call ActionForm.reset() i| |16207|Opn|Enh|2003-01-17|Add ability to import tile attributes into a java.| |16249|Opn|Enh|2003-01-20|localized float validation|
svn commit: rev 65927 - struts/sandbox/trunk/struts-chain
Author: craigmcc Date: Sun Nov 14 15:12:30 2004 New Revision: 65927 Modified: struts/sandbox/trunk/struts-chain/build.properties.sample struts/sandbox/trunk/struts-chain/build.xml Log: Adapt build process to reorganized SVN repository. In particular, add new struts.core.home property to point at where this portion of the repository is checked out. Modified: struts/sandbox/trunk/struts-chain/build.properties.sample == --- struts/sandbox/trunk/struts-chain/build.properties.sample (original) +++ struts/sandbox/trunk/struts-chain/build.properties.sample Sun Nov 14 15:12:30 2004 @@ -22,7 +22,7 @@ # source code. To use this file, make a copy of it in build.properties and # customize the values as required. # -# $Id: build.properties.sample,v 1.6 2004/07/17 01:47:52 craigmcc Exp $ +# $Id$ # # In order to build with Tomcat integration you must have the catalina-ant.jar # in your CLASSPATH. This file is located under the jakarta-tomcat/server/lib @@ -42,3 +42,5 @@ # distribution chain.home=/usr/local/jakarta-commons/chain/dist +# The absolute or relative pathname of the Struts core source repository +struts.core.home=../../../core/trunk Modified: struts/sandbox/trunk/struts-chain/build.xml == --- struts/sandbox/trunk/struts-chain/build.xml (original) +++ struts/sandbox/trunk/struts-chain/build.xml Sun Nov 14 15:12:30 2004 @@ -35,6 +35,7 @@ property name=chain.home value=../../../jakarta-commons/chain/dist/ property name=servlet.home value=/usr/local/tomcat-4.1/common/lib/ + property name=struts.core.home value=../../../core/trunk/ property name=struts.home value=../../dist/ @@ -207,7 +208,7 @@ !-- Copy example webapp from standard build -- copytodir=${build.home}/webapps/example - fileset dir=../../target/example/ + fileset dir=${struts.core.home}/target/example/ /copy !-- Copy override files from our local directory -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Nightly Builds
I've adjusted the nightly build scripts to account for the reorganization of our Subversion repository that was recently done, and caused last night's build (20041114) to break. Tonight's should be fine. Nightly builds of the core Struts distribution are at: Struts Core Distribution: Binaries: http://cvs.apache.org/builds/jakarta-struts/ Source: http://cvs.apache.org/builds/jakarta-struts/src/ In addition, I've started building two of the sandbox packages on a nightly basis to make progress on their development more accessible. The distributions for these packages are combined sources and binaries, so you only need one download. Struts-Chain: http://cvs.apache.org/builds/jakarta-struts/nightly/struts-chain/ Struts-Shale: http://cvs.apache.org/builds/jakarta-struts/nightly/struts-shale/ In addition, nightly builds of the Struts-Faces integration library (also combined binary and source) continue to be available: Struts-Faces: http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/ Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Apache Struts Wiki] Updated: StrutsShale
Date: 2004-11-14T17:04:18 Editor: FrankBogman [EMAIL PROTECTED] Wiki: Apache Struts Wiki Page: StrutsShale URL: http://wiki.apache.org/struts/StrutsShale no comment Change Log: -- @@ -1,6 +1,6 @@ This is a proposal for an overall architecture for Struts 2.0, based on dividing the controller tier into modular layers, and dramatically increasing the usability of the controller functionality. - * [http://svn.apache.org/viewcvs.cgi/*checkout*/struts/trunk/contrib/struts-shale/README.html Proposal Details] (latest SVN version) + * [http://svn.apache.org/viewcvs.cgi/*checkout*/struts/sandbox/trunk/struts-shale/README.html Proposal Details] (latest SVN version) * [http://www.apache.org/~craigmcc/struts-shale/ API Javadocs] (periodically updated) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]