Re: Struts2 Validaions

2008-02-13 Thread Nuwan Chandrasoma

Hi,

Your issue is not clear. can you please tell.

what is the theme now your using?
are you using javascript validation?
what is the theme that didnt have this issue?

Thanks,

Nuwan




Sanjeewa Saman wrote:

Hi All,

 


We have a problem in using validations.

 


I have tried both xml based and annotation based validations.

 


But the problem is , The error messages don't get cleared once we get a
error message and it will repeat in the UI.

 


This will happen with the simple theme ,as if we don't use the theme the
components will not be placed in the proper way.

 


That issue was not there when we dot use a theme but the components were
here and there.

 


So can u please help me to use the validations correctly with a example.

 

 



  



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



RE: Struts2 Validaions

2008-02-13 Thread Sanjeewa Saman
HI nuwan,

We are using simple theme with struts2 here and the problem is repeating the
error message in the UI.

And do not use any java scripts for validation.

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.

Thanks,
sanjeewa

-Original Message-
From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 13, 2008 6:38 PM
To: Struts Users Mailing List
Subject: Re: Struts2 Validaions

Hi,

Your issue is not clear. can you please tell.

what is the theme now your using?
are you using javascript validation?
what is the theme that didnt have this issue?

Thanks,

Nuwan




Sanjeewa Saman wrote:
 Hi All,

  

 We have a problem in using validations.

  

 I have tried both xml based and annotation based validations.

  

 But the problem is , The error messages don't get cleared once we get a
 error message and it will repeat in the UI.

  

 This will happen with the simple theme ,as if we don't use the theme the
 components will not be placed in the proper way.

  

 That issue was not there when we dot use a theme but the components were
 here and there.

  

 So can u please help me to use the validations correctly with a example.

  

  


   


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



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



RE: Struts2 Validaions

2008-02-13 Thread Dave Newton
--- 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.

Dave


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



Re: Struts2 Validaions

2008-02-13 Thread Martin Castellanos
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.

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.

 Dave


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




-- 
Martin Castellanos


Re: Struts2 Validaions

2008-02-13 Thread Dave Newton
--- 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]



Re: Struts2 Validaions

2008-02-13 Thread Martin Castellanos
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