> -----Original Message-----
> From: Erik Hatcher [mailto:[EMAIL PROTECTED] 
> 
> 
> Why do you need @xwork.field name="..."?  Would you ever make it 
> different from the actual field name?
> 
> I build the <strutsvalidationxml> subtask for XDoclet, and one of the 
> principles I really was rigorous about was not repeating 
> myself (DRY).  
> Since one of XDoclet's primary goals is to avoid duplication, 
> I cringe 
> when I see duplication with XDoclet @tags.  At least, in the 
> case where 
> the names match up, the name="..." attribute should be 
> omitted and the 
> default value be the field name itself, I think.
> 
> Why do you have it tagged on a private field?  XWork is not 
> seeing that 
> field at all, is it?  What I did on the Struts side of things 
> was have 
> the setters tagged since that is the entry point for data 
> before it is 
> validated.  I'm not sure how this differs with how XWork validation 
> works, so I might be off base here.  But should we be tagging setters 
> rather than private fields?

Well, it needs to be the same as the property name since it uses the
getter to get the value to validate :-) So I'd say the name attribute
should not even be optional. I'm not sure whether this should be on
getters or setters... You may want to validate properties with no
setter? Just a thought.

> 
> Since there are XDoclet committers here, I think its 
> reasonable to keep 
> this subtask in the XDoclet codebase - lots of other 3rd 
> party stuff is 
> already there, including some earlier WebWork subtasks.
> 
>       Erik

I thought the idea with new Xdoclet stuff was to make the separate
projects maintain their own plugins? Maybe that's just the 2.0 stuff,
though.

Jason


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to