Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=2852980
By: lpiatti

This is for break my old post on validation that became too long.

1) I changed my dbforms_generate_validation.xsl to address some bug found.
here is the list of canges:
a)Added a new template named dependsAttribute: useful to automatically append
required validation on fields.
Automatic Detection of "Required validation" is based on a non-standard 
non-mandatory
field named "required" to add as attribute of required fields in 
dbforms-config.xml
file.
If this attribute is not specified or is not equal to 'true' transfomation 
behaviour
is as before.
b) added test of required attribute on foreignkey required validation as above.
Imho relationships can be not mandatory. Default behaviour as before.
c) replaced maxchars variable definition with maxlength in "maxlength 
validation"
maybe a bug
d) removed all variable substitution from msg tag, this is never replaced at
runtime
e) rewritten error messages to address default dbform format = msg:arg0,..,arg4

2) In my debug sessions I found that standard required validation as a little
bug.
In case of adding a new record, value!=oldValue is a condition to verify to
apply required validation, but this in never true while adding new records
Henner say: There is a parameter somewhere with wich you can distinguish between
insert and update mode.
I have modified the code a little without searching for this parameter, I think
that removing incorrect test is more efficient that adding a new test and branch

How can I send this files?

3) when I try to start float validation on server side I get this error:

ERROR org.apache.commons.validator.Validator 
- 
reflection:org.dbforms.validation.DbFormsValidator.validateFloat(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field)
I searched source file and in DbFormsValidator Class this method as a different
signature: Locale as one more parameter ..
Is this a bug or I missed something?

A little trace:

java.lang.NoSuchMethodException:
org.dbforms.validation.DbFormsValidator.validateFloat(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field)
        at java.lang.Class.getMethod(Unknown Source)
        at 
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:4
01)
        at 
org.apache.commons.validator.Validator.validateField(Validator.java:544)
        at org.apache.commons.validator.Validator.validate(Validator.java:582)
        at 
org.dbforms.event.ValidationEvent.doValidation(ValidationEvent.java:109)
        at org.dbforms.servlets.Controller.process(Controller.java:305)
        at org.dbforms.servlets.Controller.doPost(Controller.java:107)
....

bye
Luigi

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=55830


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to