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 31514] - Either insufficient docs on validwhen or a bug
Date Sun, 03 Oct 2004 05:28:25 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=31514>.
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=31514

Either insufficient docs on validwhen or a bug





------- Additional Comments From yegor.jbanov@spicesoft.com  2004-10-03 05:28 -------
Sorry for bothering again, but I think that the same problem occurs again with 
Integer and even primitive int types. The validator does string comparison 
anyway.

I've looked through the code and it seems that all starts before 
ValidWhenParser.g

Studying the stack trace I noticed that the getter methods of my ValidatorForm 
are invoked only by
org.apache.commons.validator.util.ValidatorUtils.getValueAsString
(ValidatorUtils.java:105)

If you look at the method validateValidWhen in class ValidWhen (line 69) the 
field value is converted to String regardless of its initial type (lines 78 and 
94-98). And the line 77 - validator.getParameterValue(Validator.BEAN_PARAM) - 
seems quite mysterious to me, might be just the part I'm missing. So the 
problem might be caused by wrong type recognition by the ValidWhenParser and it 
does string comparison.

Struts version: 1.2.4

Thanks again!

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


Mime
View raw message