struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31509] - html:javascript tag doesn't work right with jsFunctionName set
Date Sun, 03 Oct 2004 17:39:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31509>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31509

html:javascript tag doesn't work right with jsFunctionName set

erh+apache@nimenees.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From erh+apache@nimenees.com  2004-10-03 17:39 -------
I did not write a custom validator function.  Notice the class name:           
 classname="org.apache.struts.validator.FieldChecks"

Why should I write my own java validation function when the existing one works fine?

Having jsFunctionName mean "name of the function called by the jsFunction" is
extremely non-obvious and confusing.  If you don't want to break backwards
compatibility I can see not changing what it does.  However, there should be
_some_ way to specify the name of the name of the javascript validation function.
Perhaps a "jsValidationFunctionName" attribute?  Or "jsMethodName" to be similar
to the "method" attribute?

At the very least, this _needs_ to be documented.  This appears nowhere on the
validator guide(http://struts.apache.org/userGuide/dev_validator.html) and the
documentation in the dtd is just plain wrong.  
  1) The method attribute needs to say that it is the name of _both_ the java
     and javascript methods.
  2) The jsFunction attribute needs to say that it is the name of the _file_ 
      containing the javascript function.
  3) The jsFunctionName attribute could use an explanation of how it is 
      generally used by the javascript validator functions.  This also needs
      to be described as being a _constructor_ that creates a javascript object
      whose properties are the descriptions of the fields.  It does _not_
      return anything.

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


Mime
View raw message