Ok this is my problem:

The first time I tried to add validation I made an
ActionName-methodname-validation.xml file, and added the validationWorkFlow
stack. The validation was executed and errors were detected but the action
just kept going, I asked and the problem was that my action needed to
implement ValidationAware in order to take an action after errors are
detected, I didn't want to implement the ValidationAware since I already
defined the errors in the xml, so I decided to extend ActionSupport, and it
worked. When validation failed the input action was invoked and the errors
were displayed.
The problem is that after correcting the errors and submiting the form
again, input action was beeing invoked and the same errors were there, and
those errors that I didn't correct appeared twice, so the I had the errors
from the first time and the second time, And everytime I pressed submit
errors were added.
That's how I ended up implementing Preparable to clearErrorsAndMessages().
I'd appreciate any help. Thanks


On Wed, Feb 13, 2008 at 9:45 AM, Dave Newton <[EMAIL PROTECTED]> wrote:

> --- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> > I had this problem, I don't think it's related to the theme. I'm new to
> > struts so this might not be the best solution, I made my action
> implements
> > Preparable and I clean up the errors in the prepare method.
>
> I believe you may be responding to a different thread; this question
> related
> specifically to error message display versus form component layout, which
> is
> theme-related.
>
> There was a different thread regarding lingering error messages; you
> should
> never have to clean up error messages via Preparable, though: you may want
> to
> start a new thread or continue the existing thread if you're having an
> issue
> with that.
>
> Dave
>
> > On Feb 13, 2008 7:46 AM, Dave Newton <[EMAIL PROTECTED]> wrote:
> > > --- Sanjeewa Saman <[EMAIL PROTECTED]> wrote:
> > > > We are using simple theme with struts2 here and the problem is
> > repeating
> > > > the error message in the UI.
> > >
> > > The "simple" theme's UI components, IIRC, don't include the error
> > > messages.
> > >
> > > > When we do not use a theme may be the default theme we do not have
> this
> > > > issue , but we have problem of the arrangement of the components
> with
> > > this
> > > > default one.
> > >
> > > Please see the themes and templates documentation:
> > >
> > > http://struts.apache.org/2.x/docs/themes-and-templates.html
> > >
> > > The default theme's UI components use a table-based layout. You may
> need
> > > to
> > > modify an existing theme, create a new theme, or use some combination
> of
> > > theming and manual work to accomplish whatever your needs are.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Martin Castellanos

Reply via email to