--- 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
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:
td
c:if test=${an error for field 'xxx' exists}
class=someErrorClass
/c:if
--- On Wed, 9/10/08, Cosmin Marginean wrote:
Is
--- 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:
td
c:if test=${an error for field 'xxx' exists}
class=someErrorClass
/c:if
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
/
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
From: Johnson nickel [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
Date: Tue, 29 Jan 2008 23:28:42 -0800 (PST)
To: user@struts.apache.org
Subject: Re: Error messages is repeated Using
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
--- 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 @RequiredFieldValidator
Thanks for your quick response,
In my Login.jsp,
s:textfield name=username label=UserName /
s:password name=spassword label=Password /
input type=image src=../images/Login.gif value=Login
Instead of using s:submit value=Login/, I used html image tag .
If i used s:submit it works fine.
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 user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: error messages doesn't
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 struts 1.2.4
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 message resources on sourceforge. (struts apps)
The main
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
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,
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 wise,
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
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 this weird
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 PROTECTED]
To:
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: error messages not displaying
Hi,
I have my html
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: error messages not displaying
Hi,
I have my html taglib definition on the top on my
main
jsp
: Re: error messages not displaying
Hi,
I have the following definition in the tiles.xml.
definition name=global
path=/WEB-INF/tiles/standardLayout.jsp
put name=title value=Title /
put name=topLinks
value=/WEB-INF/tiles/topNav.jsp /
put name=bottomLinks
value=/WEB
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 )
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,
23 matches
Mail list logo