How to clear a bean field with Stripes.

Posted by Davoink on Stack Overflow See other posts from Stack Overflow or by Davoink
Published on 2010-06-08T15:06:09Z Indexed on 2010/06/08 22:32 UTC
Read the original article Hit count: 378

In a JSP I have the following field:

<stripes:text name="email"/>

This field is in my action bean(snippet):

    public class CreateClaim implements ActionBean {

    private String email;

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public Resolution alc(){
        email = "poodle";
        return new ForwardResolution("aForward.jsp");
    }

}

In the alc() methos I am setting email to be null. But when the pages renders the value of the email field is exactly as it was entered originally. Is there a way of clearing this field once and event has triggered?

Cheers

Dave

© Stack Overflow or respective owner

Related posts about java

Related posts about web-development