Hi,

I'm getting a Stripes validation error report after going to URL:

http://www.myserver.com/my-app/some/1

"The value (1) entered in field My Value must be a valid number"

I have clean URLs configured.

My ActionBean is like this:

@UrlBinding("/some/{myValue}")
public class SomeActionBean implements ActionBean {
    private ActionBeanContext context;

    @Validate(converter=IntegerTypeConverter.class)
    private int myValue;
    
    @DefaultHandler
    public Resolution view() {
        
        System.out.println(myValue);
        return new ForwardResolution("some.jsp");
    }
    
    @Override
    public ActionBeanContext getContext() {
        return context;
    }

    @Override
    public void setContext(ActionBeanContext context) {
        this.context = context;
    }

    public int getMyValue() {
        return myValue;
    }

    public void setMyValue(int myValue) {
        this.myValue = myValue;
    }
}

The full error message was:
"Here's how it is. Someone (quite possibly the Stripes Dispatcher) needed to 
get the source page resolution. But no source page was supplied in the 
request, and unless you override ActionBeanContext.getSourcePageResolution() 
you're going to need that value. When you use a <stripes:form> tag a hidden 
field called '_sourcePage' is included. If you write your own forms or links 
that could generate validation errors, you must include a value for this 
parameter. This can be done by calling request.getServletPath()."


Any ideas how to get this working?





------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to