depends on if you want JS validation
action validation
ajax validation
explained at
http://struts.apache.org/2.x/docs/ajax-validation.html
HTH
Martin
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the
--- On Wed, 9/10/08, Cosmin Marginean wrote:
> Sorry for the misunderstanding - might not have been so
> clear. I meant performing some logic in the JSP. I would
> like to be able to do something like:
>
> class="someErrorClass"
>
...
In that case, use ValidationAware's getFie
Sorry for the misunderstanding - might not have been so clear. I meant
performing some logic in the JSP. I would like to be able to do
something like:
class="someErrorClass"
>
--- On Wed, 9/10/08, Cosmin Marginean wrote:
Is there a way to check if a certain field error has been
--- On Wed, 9/10/08, Cosmin Marginean wrote:
> Is there a way to check if a certain field error has been set?
In S2 use ValidationAware's getFieldErrors(...) method.
http://struts.apache.org/2.0.11.2/struts2-core/apidocs/com/opensymphony/xwork2/ValidationAware.html#getFieldErrors()
Dave
--
son nickel <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List
> Date: Tue, 29 Jan 2008 23:28:42 -0800 (PST)
> To:
> Subject: Re: Error messages is repeated Using Struts 2 Annotation validation
>
>
> Thanks for your quick response,
>
> In my Login.jsp,
>
Thanks for your quick response,
In my Login.jsp,
Instead of using , I used html image tag .
If i used it works fine.
newton.dave wrote:
>
> --- Johnson nickel <[EMAIL PROTECTED]> wrote:
>>
> @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",messag
Hi,
Something simillar happens to me when i started with Struts 2. I use
appfuse and I realized that a message displays just above the field I'd
validated, and where I included a messages.jsp (this jsp displays the action
and error messages), usually at the top of the html page.
To solve t
--- Johnson nickel <[EMAIL PROTECTED]> wrote:
>
@RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName
> is required")
For a string field you'll probably want to use the @RequiredStringValidator:
a text field will return an empty string, whereas @RequiredFieldVali
Thank you very much Paul. It was a big time save for me.
Regards
Hakan
Paul Benedict <[EMAIL PROTECTED]>
20/01/2006 04:07 PM
Please respond to
"Struts Users Mailing List"
To
Struts Users Mailing List
cc
Subject
Re: error messages doesn't appear i
Hakan,
You need to store the error messages in the request or session after you
retrieve them:
ActionErrors errors = form.validate();
if ((errors != null) && !errors.isEmpty()) {
saveErrors(request, errors);
return mapping.getInputForward();
}
Paul
I solved it, removing redirect="true" from the action-mapping tag in
struts-config.xml solved it.
Ian.
On 6/8/05, Ian van der Neut <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have a little problem with displaying an "Invalid login" message on
> my login page. I am using tomcat 5.0.28 and strut
leson, Allen <[EMAIL PROTECTED]>
> Date: Apr 13, 2005 9:18 PM
> Subject: RE: Error Messages from the Database - Simple method?
> To: [EMAIL PROTECTED]
>
> David,
>
> I think I replied to this, but I released a more generalized version of
> the two reloadable mess
Comments in line..
- Original Message -
From: "David Johnson" <[EMAIL PROTECTED]>
Sent: Thursday, April 07, 2005 7:46 PM
> Oy.
>
> I'm assuming that you're talking about the loadLocale() method within...
>
> org.apache.struts.util.PropertyMessageResources
>
> I see that inheritance
Oy.
I'm assuming that you're talking about the loadLocale() method within...
org.apache.struts.util.PropertyMessageResources
I see that inheritance wise,
1. PropertyMessageResources extends MessageResources
2. PropertyMessageResourcesFactory extends MessageResourcesFactory
Logical.
So, I'l
David,
Well the answer is simple yet complex.
First off what you want to do is of course not quite possible right now.
MessageResources are loaded from a property file based on locale, and
are initialized in the loadLocale method.
Examination of that method shows that if the locale is already
Ben,
Your statement doesn't really give a lot of detail on what you're
trying to accomplish, but I'm going to take a stab:
Struts is going to save validation errors into the request. If you're
doing a redirect back to the input form when validation fails you're
going to wind up with a new reques
nt: Tuesday, October 26, 2004 5:55 PM
Subject: Re: error messages not displaying
> Hi,
> I have the following definition in the tiles.xml.
>
> path="/WEB-INF/tiles/standardLayout.jsp">
>
> value="/WEB-INF/tiles/topNav.jsp" />
&g
rom: "struts lover" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, October 26, 2004 5:28 PM
> Subject: Re: error messages not displaying
>
>
> > Hi,
> > I have my html taglib defin
You need it in every jsp that use those tags, not just the "main" one.
Niall
- Original Message -
From: "struts lover" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 5:28 PM
Subject: Re:
Hi,
I have my html taglib definition on the top on my main
jsp.
Thanks
--- Niall Pemberton <[EMAIL PROTECTED]>
wrote:
> When you broke your jsp up into tiles did you still
> include the html taglib
> definition?
>
> Niall
>
> - Original Message -
> From: "struts lover" <[EMAIL PROTECT
When you broke your jsp up into tiles did you still include the html taglib
definition?
Niall
- Original Message -
From: "struts lover" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 1:17 PM
Subject: error messages not displaying
> Hi Everyone,
> I have thi
I would recommend any of the standard textbooks, Ganesh. Do you have
access? You can also look at the manuals on the struts sight. There is a
lot of documentation on this. The fact that you use tiles is irrelevant to
this question. I think I own all the books, etc., so if you get stuck,
pl
Hi Ganesh,
Listing down what all has to be done to display error message
when you are using resource bundle and tiles definition.
This is a very simple example which should give you a picture of
how to go about it.
application.properties ( The resource bundle file )
error.auth.failure=Error:N
23 matches
Mail list logo