You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mteccles <ma...@googlemail.com> on 2008/03/04 11:16:45 UTC
unexpected behaviour
Hi,
I developed a form that does some validation. I included validation and
workflow interceptor in the actions stack.
The validation is very simple, it makes sure one field is a minimum length.
It works fine except for the following scenario:
1) submit invalid form (input is returned with field error showing)
2)fix input and re-submit
result:
field error is still there therefore workflow sends it to input again.
Surely the fielderror should of been popped from the stack in the
<s:fielderror> tag? Do i have to manually remove the error from the stack or
is there a bug in my solution?
--
View this message in context: http://www.nabble.com/%3Cs%3Afielderror%3E-unexpected-behaviour-tp15824230p15824230.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: unexpected behaviour
Posted by Dave Newton <ne...@yahoo.com>.
--- mteccles <ma...@googlemail.com> wrote:
> Now i just thought the action is wired by spring as a singleton, and the
> fielderrors are a property of this object... maybe forms should not be
> singletons. still like to know thoughts
Actions are assumed to be created per-request. If it's a singleton I would
imagine all sorts of bad things would happen.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: unexpected behaviour
Posted by mteccles <ma...@googlemail.com>.
Now i just thought the action is wired by spring as a singleton, and the
fielderrors are a property of this object... maybe forms should not be
singletons. still like to know thoughts
mteccles wrote:
>
> Hi,
>
> I developed a form that does some validation. I included validation and
> workflow interceptor in the actions stack.
>
> The validation is very simple, it makes sure one field is a minimum
> length. It works fine except for the following scenario:
>
> 1) submit invalid form (input is returned with field error showing)
> 2)fix input and re-submit
>
> result:
>
> field error is still there therefore workflow sends it to input again.
> Surely the fielderror should of been popped from the stack in the
> <s:fielderror> tag? Do i have to manually remove the error from the stack
> or is there a bug in my solution?
>
--
View this message in context: http://www.nabble.com/%3Cs%3Afielderror%3E-unexpected-behaviour-tp15824230p15824298.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org