Hi, all.
I have a config with

                <action name="Registration">
                        <result>/pages/register.jsp</result>
                </action>
                <action name="Register" class="UserAction">
                        <result>/pages/result.jsp</result>
                        <result name="input">/pages/register.jsp</result>
                </action>

action with

        public String execute() {
                userManager.registerUser(getEmail(), getPassword());
                return SUCCESS;
        }

        public void validate() {
                if (getEmail().length() == 0) {
                        addFieldError("email", 
getText("user.registration.errors.no.email"));
                }
                if (getPassword().length() == 0) {
                        addFieldError("password",
                                        
getText("user.registration.errors.no.password"));
                }
                if (getPasswordConfirmation().length() == 0) {
                        addFieldError(
                                        "passwordConfirmation",
                                        
getText("user.registration.errors.no.password.confirmation"));
                }
}

and jsp register.jsp with

<s:form action="Register">
                        <s:textfield name="email" label="email"/>
                        <s:password name="password" label="password"/>
                        <s:password name="passwordConfirmation" label="password 
confirmation"/>
                        <s:submit />
        
</s:form>


but, when i'm trying to submit zero-form i'm of course see FieldError
messages, but when i'm pressing submit button again - i see double amount of
same messages, again - triple amount ... and i cannot understand - why i see
too much same messages?
-- 
View this message in context: 
http://www.nabble.com/struts-2.1.2---strange-bug-tp17138404p17138404.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to