Hello,

 

I'm new to Stripes and I'm working through the Quick Start Guide calculator
example.

 

When I run the calculator example with the division operation and the
validation method ( avoidDivideByZero with annotation
@ValidationMethod(on="division") ), an IllegalStateException is thrown by
ValidationErrorReportResolution if I try to divide by zero.
 
Here is the text displayed in the page:

Stripes validation error report

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 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(). 

Strangely (or not), the exception is only thrown if divide by zero is the
first operation after bringing up the page. If I perform an 'add' operation
before attempting to divide by zero, then the exception is not thrown.

I'm running the latest Stripes 1.5.2 under Tomcat 6.0. Is this a legitimate
bug (i.e. is it just me)? What should go in the method avoidDivideByZero so
that the exception isn't thrown?

Thanks,

Steve Solomon

Sr. Software / Systems Engineer

Ironhawk Technologies, Inc.

6701 Center Drive West, Suite 700

Los Angeles, CA  90045

 

(310) 815-2800 Main - ext. 6224

(310) 258-9824 Fax

 

 <mailto:[email protected]> [email protected]

 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to