I previously had the confirmPassword field in the UserFormEx.java - the reason
I moved it to User.java is documented in the release notes for 0.8. ;-)

http://tinyurl.com/e5td

- Moved "confirmPassword" property from UserFormEx.java to User.java so 
  JavaScript validations would occur in the proper order.

When it was in UserFormEx.java - the confirmPassword validation would get
called before password, which seemed silly to me.  This was an easy fix.  A
better solution is to add to XDoclet and possibly add an attribute (i.e.
"order") that allows validation attributes to be specified, rather than
calculated based on the order they appear in the source.

HTH,

Matt

--- Dan Allen <[EMAIL PROTECTED]> wrote:
> As I was browsing appfuse I noticed a potential problem when
> creating forms under the current setup.  In User.java there is a
> field named confirmPassword.  This field is definitely a view (or
> form) specific field and I feel as though it doesn't really belong
> in the model.  However, removing it brings up several problems.
> First, assuming the xdoclet is going to generate the validation,
> where will this validation be specified now that it is gone from the
> model?  Secondly, where would it go if it doesn't belong in the
> model?  I imagine it should go in UserFormEx.java.  Aha, so maybe
> when generating the validation it should look in two places, first
> User.java and then UserFormEx.java for any "extra" validation
> fields.  What fields you ask?  What about composite fields?  Fields
> that are necessary to split up in the form but actually make up only
> a single field (call it a calculated field).  Example?  The easiest
> is a datetime.  In the form you are going to want a drop down for
> Date and a drop down for Time so that you can merge them to get a
> datetime.  You could combine them with javascript, but there is no
> reason not to create these in the ActionForm.  Other examples could
> include sentence completion of some sort...I don't know, get
> creative and reply with another example.
> 
> Thoughts?  I am so close to actually getting some work done here if
> I could just find the answer...water!  hehehe
> 
> Dan
> 
> -- 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Daniel Allen, <[EMAIL PROTECTED]>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Chaos reigns within. 
> Reflect, repent, and reboot.  Order shall return.
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> Struts-apps mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/struts-apps
> 
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Struts-apps mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/struts-apps

Reply via email to