When you are talking about action messages it is not a hash map with a key.
It is a simple CollectionString. ActionSupport has a method
getActionMessages() that returns this string collection.
Field errors are a different matter. These come through as a MapString,
ListString. You get
Good afternoon,
I'd like to know
(1) how to get all action messages in java code
(2) How to remove some action message from ActionMessages
Something like (1) returns
ActionMessage(key1)
ActionMessage(key2)
...
ActionMessage(keyN)
(2) removes key1...key9
Thanks a lot!
--
Lu Ying
Hi,
I want to redirect to another action but preserve the action messages/errors
from the previous action. Is there any standard way to achieve this
functionality in Struts 2? Or do I have to write an Interceptor for this?
I have a use case where the errors on a web screen needs to be shown
Please use a new thread for this issue. The problem addressed here is totally
diffirent from yours.
Sundararaman, Anand wrote:
Hi,
I want to redirect to another action but preserve the action
messages/errors from the previous action. Is there any standard way to
achieve
but preserve the action
messages/errors from the previous action. Is there any standard way to
achieve this functionality in Struts 2? Or do I have to write an Interceptor
for this?
I have a use case where the errors on a web screen needs to be shown on a
different screen to which I want
Thanks Felipe,
This was quick. I will incorporate the Interceptor and check it out.
Thanks,
Anand
-Original Message-
From: Felipe Fraga [mailto:felipefr...@gmail.com]
Sent: Friday, February 27, 2009 10:17 AM
To: Struts Users Mailing List
Subject: Re: Preserving Action Messages
, so by the time we get to the JSP that shows action
messages, another whole action has executed. Do action messages have a
limited scope, i.e. are they being lost because we started a new action?
Thanks,
Dan Allen
--
This message may contain confidential, proprietary, or legally privileged
-redirect, so by the time we get to the JSP that shows action
messages, another whole action has executed. Do action messages have a
limited scope, i.e. are they being lost because we started a new action?
Thanks,
Dan Allen
--
This message may contain confidential, proprietary, or legally
Users Mailing List
Subject: Re: Scope of action messages?
actionmessages, actionerrors and fielderrors are all request scope, so
they'll be gone by the time the redirect comes back around. You might
want to look into the scope interceptor, it can help bridge the gap.
(*Chris*)
--
This message
hang around until the corresponding
s:action___/ tag is rendered?
-Original Message-
From: Chris Pratt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 1:58 PM
To: Struts Users Mailing List
Subject: Re: Scope of action messages?
actionmessages, actionerrors
Oh. Yeah, that one looks a lot more immediately applicable. :)
Thanks!
~DVA
-Original Message-
From: Chris Pratt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 2:45 PM
To: Struts Users Mailing List
Subject: Re: Scope of action messages?
None if you use the store interceptor
Hi,
We are using struts 1.2.9 and springs. I have one issue. Action messages
(some error message and information to the user) of one user is
available to another user who is also working on the application. He may
do some other action.
Regards,
Siva
Regards,
K. Siva Swamynatha
--- Sivaswamynatha K [EMAIL PROTECTED] wrote:
We are using struts 1.2.9 and springs. I have one issue. Action messages
(some error message and information to the user) of one user is
available to another user who is also working on the application. He may
do some other action.
What's
Does struts2 handle the css-styling of action errors and messages the same
as struts1? In struts 1, i defined some keys in the message bundle
errors.prefix and errors.suffix that were automatically used to style the
html generated by the actionerrors. Is this enabled in struts2?
Thanks,
Brian
Struts 2 allows you to style them, but using themes. Themes are both
more powerful and more complicated than what Struts 1 offered.
Before you dive into customizing a theme, see if you can style it
entirely with CSS. You're best better is probably to View source in
your browser to see the
Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties is like this.
error.required=The {0) field is required field.
error.notInRange=The {0} field
]
To: user@struts.apache.org
Sent: Wednesday, November 15, 2006 8:25 AM
Subject: Query in action messages
Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties
- Original Message -
From: Hanmay Udgiri [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Wednesday, November 15, 2006 8:25 AM
Subject: Query in action messages
Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory
: Wednesday, November 15, 2006 1:56 PM
To: user@struts.apache.org
Subject: Query in action messages
Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties
: Hanmay Udgiri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 15, 2006 1:56 PM
To: user@struts.apache.org
Subject: Query in action messages
Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error
I was wrong... ignore my earlier mail..
Thanks.
Anil.
-Original Message-
From: Hanmay Udgiri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 15, 2006 1:56 PM
To: user@struts.apache.org
Subject: Query in action messages
Hi
I am doing validation in my Action Form which is extending
:-
errors.add(Error_FIELD_KEY,new ActionMessage(
error.required,getResources(request).getMessage(error.zipcode));
Regards,
Nuwan
- Original Message -
From: Hanmay Udgiri [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Wednesday, November 15, 2006 8:25 AM
Subject: Query in action messages
Hi
I am doing validation in my Action Form which is extending
ValidatorActionForm.
In validate method,I am checking for mandatory field and adding error.
The error in ApplicationResources.properties is like this.
error.required=The {0) field is required field.
error.notInRange=The {0} field
Following is the piece of code i am using to populate action message.
ActionMessages msgs = new ActionMessages();
msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
error.notValidConfName));
saveMessages(request, msgs);
I am not able to get the message for the key error.notValidConfName,
I have about 5 messages which will be passed on from my Action - View
(JSP) using ActionMessage. But at any time only one of these five messages
will be displayed in the View.
To accommodate every message in the JSP, Do I have to include this piece
of code repeatedly .
html:messages
Anuradha S.Athreya wrote:
I have about 5 messages which will be passed on from my Action - View
(JSP) using ActionMessage. But at any time only one of these five messages
will be displayed in the View.
To accommodate every message in the JSP, Do I have to include this piece
of code repeatedly .
Ray,
it's not clear what you are trying to do that is different from
standard. Struts puts the ActionErrors in the request by default. The
Messages too.
I used to know this inside out but it's been a year or so... but I think
the key is like this:
Hi, Ray,
Why is what you are doing superior to the standard? The standard is
something like the following and is very efficient, I think?
table
tr
td
!--
ERRORS
--
logic:messagesPresent
ul
html:messages
I am looking for the ability to handle the ActionMessage in a different way
in my application. In the validate method of the form I create a new
instance of ActionErrors and add ActionMessage instances to it. In the
Action dispatch method I call validate and get a non empty ActionErrors
, as it usually is in these cases,
that's by far the better choice.
Frank
From: Marcelo Epstein [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Action messages.
Date: Thu, 3 Jun 2004 11:46:44 -0300
Hi,
I have a Action
Thanks Frank,
Do you have any sample code of using SPAN ?
I think this is also good to avoid 2 submit´s click. Am I right?
- Original Message -
From: Frank Zammetti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 11:57 AM
Subject: RE: Action messages
[EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Action messages.
Date: Thu, 3 Jun 2004 13:55:11 -0300
Thanks Frank,
Do you have any sample code of using SPAN ?
I think this is also good to avoid 2 submit´s click. Am I right?
- Original Message -
From
32 matches
Mail list logo