Apparently it isn't working as I expected. I would really like to understand
how this works.

Here is my form tag:

<s:form action="ScheduleDetailAction_updateSchedule" validate="true">

Here is my struts.xml entry:

<result type="chain" name="updateSchedule">
        ScheduleDetailAction_update
</result>

Here is partial contents of my
ScheduleDetailAction-ScheduleDetailAction_updateSchedule-validation.xml

        <field name="schedule.count">
                <field-validator type="required">
                        <message>Count is required</message>
                </field-validator>      
                <field-validator type="int">
                        3
                        30
                        <message>Count must be an integer between 3 and 
30</message>
                </field-validator>      
        </field> 

and I have an update() method in my ScheduleDetailAction.java file.


Here is the problem:

If I enter an integer, the validation is checked and the form works
correctly. If I enter a String, for example, I get this error: 

NoSuchMethodException: ScheduleDetailAction.updateSchedule()


Why does it honor the struts.xml and redirect to the update() method when
the input is correct, and why does it look for a non-existent method called
updateSchedule() otherwise?

Thanks in advance.



-- 
View this message in context: 
http://old.nabble.com/s2%3A-Validation-xml-file-not-being-used-when-validating-a-method-tp26399337p26416537.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to