Keith,
Yes, I think you are missing the javax.servlet.ServletContext in your method
signature
Or your methodParams has an extra parameter.

-Richard


-----Original Message-----
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 12:07 PM
To: 'Struts Users Mailing List'
Subject: RE: NoSuchMethodException


Hey,
Thanks a bunch for the reply.  It's the validateRange method that's not
being found, the one responsible for doing the validation. Has anyone else
run into anything like this while trying to do custom validation?

- Keith



-----Original Message-----
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 3:06 PM
To: 'Struts Users Mailing List'
Subject: RE: NoSuchMethodException


How about supplying more information like the name of the method that is not
being found?

Regards,

Richard

-----Original Message-----
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 12:00 PM
To: 'Struts Users Mailing List'
Subject: RE: NoSuchMethodException


Well, so much for the helpfulness of this list.

I politely asked a few completely reasonable questions in the past few days,
and they were questions that could easily be of interest to others as well.
They were also pretty simple issues that I'm sure other people have
encountered or would have some sort of input on. Maybe people just ignore my
posts or something, but I've been trying all week to get couple simple
answers, and I'm not seeing any interest from anyone.

Maybe it's just a waste of time posting here.  You'll probably say I'm just
being in patient, but this list has such a fast turnaround that if a post is
not addressed within a few hours, it most likely won't be addressed at all.

You'll have to forgive my frustration.  Long work days trying to figure
things out with no end in sight, and no help from coworkers or the list can
drive one mad.


- Keith



-----Original Message-----
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 12:40 PM
To: Struts (E-mail)
Subject: NoSuchMethodException


Hey everyone,
I'm working on a custom validator right now, and all the validation method
does is return false.  That means it fails that validation, right? Anyway,
when I submit the form, I get a NoSuchMethod error.  What would cause this?
All of my regular validations work, just not this custom one. Here are some
code snippets.  Thanks in advance for any help!

public class CustomValidator implements Serializable 
{
        public static boolean validateRange(Object bean, ValidatorAction va,

                                        Field field, ActionErrors errors,
HttpServletRequest request)
        {
                return false;
        }
}


validator-rules.xml:

          <!-- Custom Validators -->
      
      <validator name="validRange"
            classname="com.moog.us.app.ans.validation.CustomValidator"
               method="validateRange"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionErrors,
                       javax.servlet.http.HttpServletRequest,
                       javax.servlet.ServletContext"
                  msg="errors.invalid.range">
      </validator>


And parts of my validation.xml:

    <global>

    </global>

                <form name="/AddAssignment">
                        <field  property="startRange"
                                        depends="required">
                                        <arg0 key="app.label.startRange"/>
                        </field>
                        <field  property="endRange"
                                        depends="validRange">
                        </field>
                </form>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to