Something like this would make Struts more MVC-like I think, more flexible toward
graphical design.
Has anyone implemented tags that allow for this approach, or is it possible with
existing Struts tags?
tnx
-Jan
>>> [EMAIL PROTECTED] 11-07-02 16:37 >>>
Like so?
--
To unsubscribe, e-ma
Maybe I am misunderstanding you, but the tags I put in below exist
already (the sample is right out of a working jsp page)
-Original Message-
From: Jan.Vervecken [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 9:27 AM
To: struts-user
Subject: RE: html:errors
Something like
EMAIL PROTECTED]
> Subject: RE: html:errors
>
>
>
> Maybe I am misunderstanding you, but the tags I put in below exist
> already (the sample is right out of a working jsp page)
>
>
>
>
> -Original Message-
> From: Jan.Vervecken [mailto:[EMAIL PROTECTED]]
>
: Tuesday, July 16, 2002 9:45 AM
To: struts-user
Subject: RE: html:errors
once I wished to have a possibility like this:
I wished struts could (based on the action errors set) which field has
an
error and which not
> -Original Message-
> From: [EMAIL PROTECTED]
> [mail
--Original Message-
From: Jan.Vervecken [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 9:27 AM
To: struts-user
Subject: RE: html:errors
Something like this would make Struts more MVC-like I think, more
flexible toward graphical design.
Has anyone implemented tags that allow for this appro
Sorry about that... I started with the older struts, but did not really
start working with it alot until recently under the 1.1 regime
-Original Message-
From: Jan.Vervecken [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 10:17 AM
To: struts-user
Subject: RE: html:errors
ah
With the current implementation, the error key must have a value specified
in a properties file. However, the actual message text can have up to four
parameters. You specify the values for these in the ActionError
constructor. This allows for parameterization of the resulting text, if not
full
IN YOUR ACTION
ActionErrors errors = new ActionErrors();
if (myBoolean){errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("error.password.mismatch"));
IN YOUR RESULTING JSP PAGE
- Original Message -
From: "storck" <[EMAIL PROTECTED]>
To: "User Struts (E-Mail)" <[EMAIL PROTECTED]>
S
I thought I would send this modified from what
Jonathan sent so it was clear how to add an error.
The first parameter adding an error to ActionErrors is
the key it is filed under. So typically you use the
property name of the field so it can be retrieved next
to the field if you need to.
Action
Hey,
This kinda depends on what errors you are looking for. If you are using
automatic form validation, then make the validate() method simply return an
ActionErrors object with any error messages. If there are no errors, return
null or an empty ActionErrors. Struts will automatically take the
Von: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 11. Juli 2002 14:31
An: 'Struts Users Mailing List'
Betreff: RE: html:errors
Hey,
This kinda depends on what errors you are looking for. If you are using
automatic form validation, then make the vali
.
-Ursprüngliche Nachricht-
Von: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 11. Juli 2002 14:31
An: 'Struts Users Mailing List'
Betreff: RE: html:errors
Hey,
This kinda depends on what errors you are looking for. If you are using
auto
Subject: Re: html:errors
From: Eric Rizzo <[EMAIL PROTECTED]>
===
[EMAIL PROTECTED] wrote:
> Like so?
>
>
>
>
For that why not just put the and elements as the
value of errors.header and errors.footer in your ApplicationResources file?
Eric
--
Eric Rizzo
So
a problem with
it.
~ Keith
http://www.buffalo.edu/~kkamholz
-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: html:errors
Subject: Re: html:errors
From: Eric Rizzo <[EMAIL PROTECTED]>
===
--Original Message-
From: kkamholz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 2:10 PM
To: struts-user
Subject: RE: html:errors
Yeah, that's what I do. I make the font part of the header/footer, as
well
as tags for a list. Then the individual error messages are list items.
edu/~kkamholz
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: RE: html:errors
If you have the HTML in the resources file, you are stuck with that font
across the whole application I would think. Fo
July 11, 2002 4:09 PM
To: struts-user
Subject: RE: html:errors
True, putting the html in the resources file does cut down a little bit
on
customization, but sometimes it's nice. I'm doing an entire application
on
my own, so I don't really have to worry about what other programmer
This is some code that I used in an actionForm.
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((userId == null) || (userId.length() < 1)) {
errors.add("noUser", new ActionError
("adresses.insertUser.noUser"));
}
retur
On Monday, September 15, 2003 at 3:22:27 PM, Ritvik wrote:
R> Hi There,
R> I am using tag at top of my page to display any
R> validation errors when a form is submitted, but for some reason, I
R> couldn't see any errors message even I have left some mandatory fields
R> blank. I am not getting a
To place the error beside the text field, you explicitly call it next to
each field.
In your case, simply do this:
Hope this helps,
-scott
At 06:52 PM 12/13/2002 -0500, you wrote:
Hi,
According to the TIP " Don't settle for " at
http://husted.com/struts/tips/index.html,
Joao,
Did you do this?
Username:
Password: -Original Message-
> From: Joao Araujo [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 10:45 AM
> To: [EMAIL PROTECTED]
> Subject: html:errors location
>
> Hi,
>
> According to the TIP " Don't settle for
thank you guys.
Joao,
Joao,
Did you do this?
Username:
Password: -Original Message-
> From: Joao Araujo [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 10:45 AM
> To: [EMAIL PROTECTED]
> Subject: html:errors location
>
> Hi,
>
> According to the T
Are you invoking saveErrors() in the action that generates the ActionErrors?
Sri
-Original Message-
From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 4:48 PM
To: '[EMAIL PROTECTED]'
Subject: html:errors & ActionErrors.GLOBAL_ERROR
Hi,
I am doing the f
ibute(ERROR_KEY);
log.debug("errors is:"+errors);//this is null
Thanx,
Vijay
-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 5:47 AM
To: Struts Users Mailing List
Subject: RE: html:errors & ActionErrors.GLOBAL_ERROR
}
ActionErrors errors = (ActionErrors)request.getAttribute(ERROR_KEY);
log.debug("errors is:"+errors);//this is null
Thanx,
Vijay
-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 5:47 AM
To: Struts Users Mailing Lis
Hi - I just did this in my form.
html:errors itself doesnt do this. My actionform holds the row and column
index of my error field which are set at the of validation.
what i do is check if the error object exists and if the row and column
indices match one of the fields being displayed - the c
You can check if there is an errors object in scope
using the logic tags to change the color of a label.
red label1
blue lable2
If you want to display the error message next to a
field, you can do this. This will display all error
messages that have
Ignore what I said about the logic tags since that
doesn't tell you whether a specific field has an
error. You could use the errorsExists tag from my
Validator package if you want to though. And you
could make errorsNotExist version of the tag.
red label
David
http://home.earthlink.net/~d
The property attribute was only implemented recently. You need the 20010128
build or later for it to work.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 29 January 2001 18:59
> To: [EMAIL PROTECTED]
> Subject: html:errors tag
>
>
>
>
> Memo from Nic
[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: RE: html:errors tag
The property attribute was only implemented recently. You need the 20010128
build or later for it to work.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 29
did you set your error text in your application resource file ?
-Original Message-
From: Frédéric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 11:22 AM
To: Struts-User
Subject: html:errors handling
Hi,
I have a strange behaviour in my application. in
Hi,
have you defined the errors.header and .footer texts in the application resource file?
hope this helps
Alexander Jesse
-Original Message-
From: Frédéric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 5:22 PM
To: Struts-User
Subject: html:errors handl
Frédéric,
I think you need these 2 lines in your
ApplicationResources.properties file. (obviously the
html can be different (maybe just )
errors.header=
errors.footer=
Struts assumes you will always have them (it should
default to a null string if you don't - I think it
maybe does in later vers
Great helps,
thanks
-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: lundi 17 decembre 2001 17:44
To: Struts Users Mailing List
Subject: RE: html:errors handling
Fridiric,
I think you need these 2 lines in your
ApplicationResources.properties file. (obviously the
Did you switch over to the messages tag?
The orignal errors tag requires a errors.header and errors.footer in the
properties files, to provide markup, but these are optional with the
messages tag.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
--
I believe the answer to your question is that a redirect causes a new
request to be made. Because of this, the errors object in your request is
gone. It was a part of the old request. When redirect is set to false,
it's merely forwarding a request and therefore keeping all of the attributes
inta
This is a similar problem with iPlanet Application Server - where it doesn't
allow forwarding from one action to another. The "workaround" for us was to
add redirect="true" to the forward.
We have the same solution as you - adding messages to the session, and grabbing
them from the session.
Mat
On Thu, Feb 01, 2001 at 09:30:52AM +1100, [EMAIL PROTECTED] wrote:
> In the code I have (2000-01-19) neither of the ErrorsTag classes in
> org.apache.struts.taglib.html or org.apache.struts.taglib.form have methods
> to support the property attribute. Am I missing somthing on this one?
You can use HTML syntax in your ApplicationResources.properties file for any
error key like:
default.global.error.key=Validation errors were
encountered while processing your request.Please review your entries and
resubmit the form.
But be sure to keep it all on a single line.
Mark
-Origin
In your properties file you are missing entries for "errors" as in...
errors.header=Validation ErrorYou must
correct the following error(s) before proceeding:
errors.footer=
-Original Message-
From: Jan Fetyko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 1:51 PM
To: Struts U
Actualy I'm not missing the entry for the error, since it gets writen to
the page, but there are aditional "null" strings.
I have this in properties file:
text.login.password.error=Password is required
on the jsp page I have
but the output on the page is not just: "Password is required"
but
List"
Subject: Re: html
<%
ActionErrors ae = ( ActionErrors) request.getAttribute( Action.ERROR_KEY);
boolean err = false;
if( ae != null) { err = true; }
%>
<%
if( err) { do_something }
%>
Mark (back from Amsterdam)
-Original Message-
From: Chang, Henrique [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15,
Thanks, this is what I was looking for!
Henrique.
-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 5:06 PM
To: 'Struts Users Mailing List'
Subject: RE: html:errors ActionErrors accessible as scripting variable?
<%
Ac
I have no idea if this is the best way to do this but I *believe* this
will work;
Object value = pageContext.getAttribute
(Action.ERROR_KEY, PageContext.REQUEST_SCOPE);
if (value == null) {
//No errors found
} else {
//Errors encountered
}
I don't think there's any tag f
Or, without scriptlets:
// Display your errors here
--
Martin Cooper
> -Original Message-
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 15, 2002 2:06 PM
> To: 'Struts Users Mailing List'
> Subject: RE: html:errors ActionError
>
> List"
>
Jerry,
I really can't see a way to get at everything *except* the global errors. You
should be able to get at *just* the global errors with:
Quoting Jerry Jalenak <[EMAIL PROTECTED]>:
> Any help on this at all?
>
>
>
> I know I've this answer before, but I cannot seem to find it in the
> a
In struts-example resource file errors.header has "" tag, and
errors.footer has "" tag. This reason why each error message must to
have these pair tags.
Hope this help.
Maya
Phillip Rhodes wrote:
> I am using the html:errors tag to display my messages, but I find that I
> have to wrap each of my
The tag generates output like this:
(errors.header)CR-LF
(message1)CR-LF
(message2)CR-LF
...
(messageN)CR-LF
(errors.footer)CR-LF
where the values in parentheses are keys into the application's properties
file, and message1 through messageN are your error message keys. Since CR-LF
is just white
I made the equivalent of the errors tag, but it
iterates through the error messages.
or
The header and footer are optional.
http://home.earthlink.ne
ok, I found the messagesPresent tag in the logic tags. I still have a
problem though:
What if I need the logic to display for two specific properties:
It would be nice if I could do something like this:
Some Logic
Here
Any Suggestions?
Thanks
Dennis
On Tue, 2002-12-03 at 14:22, Dennis Muhle
Do any of your error messages show up, or just the header and footer?
It will only print the prefix if there are errors to display.
Dave
>From: Doug Bryant <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject:
My error messages do show up. They show up as one long string. For
instance, they would show up like "Text of error1. Text of error2. Text
of error3"
I would like to get this resolved without putting tags around the
messages themselves.
thanks, Doug
On Wed, 2002-10-09 at 17:37, David Graham
8:47 AM
To: Struts Users Mailing List
Subject: Re: html:errors - how do you make a bulleted error list
My error messages do show up. They show up as one long string. For
instance, they would show up like "Text of error1. Text of error2. Text
of error3"
I would like to get this r
55 matches
Mail list logo