validation return url

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

validation return url

Joaquin Valdez-2
Hello!

Is it possible to control the return url when a validation error is triggered by the following line:

@Validate(required = true)
private String customername;

If I do not fill in customer name, it goes back to MainForm.action.  I would like to adjust that so it goes back to MainForm.action?id=3

Thank you
Joaquin Valdez


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: validation return url

Janne Jalkanen

Yup.

In your ActionBean, try something like this:

    @Override
    public Resolution handleValidationErrors( ValidationErrors errors ) throws Exception
    {
        return new ForwardResolution(“/MainForm?id=3");
    }

/Janne

On 2 Jun 2014, at 04:23, Joaquin Valdez <[hidden email]> wrote:

Hello!

Is it possible to control the return url when a validation error is triggered by the following line:

@Validate(required = true)
private String customername;

If I do not fill in customer name, it goes back to MainForm.action.  I would like to adjust that so it goes back to MainForm.action?id=3

Thank you
Joaquin Valdez

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: validation return url

Joaquin Valdez-2
Thank you Janne!

On Jun 1, 2014, at 11:35 PM, Janne Jalkanen <[hidden email]> wrote:


Yup.

In your ActionBean, try something like this:

    @Override
    public Resolution handleValidationErrors( ValidationErrors errors ) throws Exception
    {
        return new ForwardResolution(“/MainForm?id=3");
    }

/Janne

On 2 Jun 2014, at 04:23, Joaquin Valdez <[hidden email]> wrote:

Hello!

Is it possible to control the return url when a validation error is triggered by the following line:

@Validate(required = true)
private String customername;

If I do not fill in customer name, it goes back to MainForm.action.  I would like to adjust that so it goes back to MainForm.action?id=3

Thank you
Joaquin Valdez

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

smime.p7s (5K) Download Attachment