You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/01/25 10:05:38 UTC

DO NOT REPLY [Bug 26411] New: - how to align field maxlenths with JDBC source

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26411>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26411

how to align field maxlenths with JDBC source

           Summary: how to align field maxlenths with JDBC source
           Product: Struts
           Version: 1.1 Final
          Platform: Other
               URL: http://jakarta.apache.org/struts/userGuide/dev_validator
                    .html
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Validator Framework
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: hauser@acm.org


in http://www.manning-source.com/books/husted/husted_ch12.pdf on p370, Ted
rightfully says that one disadvantage of using the valiator.xml is that there is
now yet another file that needs to be kept synchronized.
With  http://sourceforge.net/projects/fmpp and asm-dumpfield as per
http://sourceforge.net/mailarchive/message.php?msg_id=6152001, I was able to
automate this all in a single place (i.e. page markup, the ActionForm, and the
Validator and Struts configuration).

The alignment of SQL field names AND lengths is yet a similar problem.
Were mysqldump working as specified (http://bugs.mysql.com/bug.php?id=1530), my
fmpp could do that too and generate a SQLConst.java file that would prevent my
sql queries suffering from time-consuming field name typos, etc.

Similarly, such sql-schema output could also be used to extract maximum field
lengths and data types for validation.xml. (especially since for example MySQL
is very much in need for maxlength validation - http://lists.mysql.com/java/6889)

Suggestions:
1) as per Ted's chapter, it would be useful to have a "Pro&Con" or "When to best
use the validator" section in dev_validator.html
2) add a ToDo section to the chapter listing the need for a mechanism to easily
align maxlength of SQL and the struts validator (see also
http://bugs.mysql.com/bug.php?id=1307) - or do you already have a solution for that?

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org