html:errors

2002-11-07 Thread Chen, Gin
Hi,
I am using:

It worked when I did manual validation and added the errors to with
add.errors property

But now I'm trying to use the struts validator and created a
validator.xml.
How do I tell the Struts-validator where to put the errors? Can I get it to
put it in the same property?
I read the chapter 12 from Ted's book but I cant find anything regarding it.

Thanks,
-Tim

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors

2001-03-26 Thread Suriyanarayanan, Senthil Kumar

Hello,
How do I generate error messages dynamically. Say for example if the
error property is not
predefined in the ApplicationResources.properties. Also does 
takes any arguments?
If it takes some arguments how can I use it? Also is it possible to have
multiple  with
in the same jsp file.


Thanks in advance.
Senthil Kumar.S
 
**
The Information transmitted herewith is sensitive information intended only
for use to the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon, this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.



html:errors

2001-10-19 Thread storck

Hi,

COULD you help me!
Is there a possibility to write the ONLY the error for a CERTAIN property of
a FormBean out at a possition where I want it?
I have something in mind where I have a form with different inputfields and
if a field has a wrong value than I have a message under that field wich
tells me what is wrong!
Does someone has a (complete) example how I can mannage that? I think I saw
that some time ago but I dont know where anymore and for what I should
search for!

MANY thanks!




html:errors/

2002-01-25 Thread jcanter


I would appreciate some help with this if possible. I'm validating a
multi-field form. In validation(), I use errors.add(...) to put the error
text in place if a required field is missing (or wrong). At the front of the
error message I want to show "Required Fields: ", and then the list of
missing fields. For example, the output from my .jsp would be:

   Required Fields: Name, Address, Phone Number, email.

The html:errors/ output is randomly sorted however. My actual output may be:

   Name Address Required Fields Phone Number email

A snippet of the validation code follows:


errors.add("missing field",new ActionError("error.missingfield"));   //
always prepend the list with this
..
errors.add("firstname",new ActionError("error.firstname.required"));
.
errors.add("lastname",new ActionError("error.lastname.required"));
.
errors.add("address",new ActionError("error.addressname.required"));
.
errors.add("city",new ActionError("error.cityname.required"));

if(errors.size() == 1) errors.clear(); // remove the prepended header string
if no errors found. Everything cool.


The output generated is more random. Not alphabetized, or in any type of
logical sort.

So, how can I force the sort to be in entry order (so the pre-pended
"Required Fields" is 1st), or, how can I conditionally put this header text
in front of the html:errors/ tag?

Any ideas?

Thanks,

Jim Canter
Isochron

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




html:errors

2002-07-11 Thread mhanel

How do I check on the jsp if some error occured?

If an error occured I wanna display a Dialog with the errormessages inside
when the page gets reloaded.



Hanel Matthias
Fachinformatiker (Anwendungsentwicklung) in Ausbildung
Logistik World GmbH Fon:+49-841-9014-300
Marie-Curie-Strasse 6   Fax:+49-841-9014-302 
D- 85055 Ingolstadt mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors tag..

2003-09-15 Thread Ritvik
Hi There,

I am using  tag at top of my page to display any
validation errors when a form is submitted, but for some reason, I
couldn't see any errors message even I have left some mandatory fields
blank. I am not getting any errors in server log as well.

I have added the validation logic in validate() method of ActionForm
subclass. I think Struts adds ActionErrors object in the request\session
scope with a know key, can anyone let me know the exaclt key name?

What would be the best way test errors using Struts?

thanks,
Ritvik


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



html:errors indexed?

2003-09-30 Thread Matthias Fraass
Hi,

I've got a JSP page with some elements which are drawn by iterating 
through a collection. Each of these elements can be validated 
individually. The problem is that html:errors doesn't handle the 
"indexed" tag as the other controls (e.g. html:text) do.
How can I show specific error messages for the controls?
Do I have to expand ErrorsTag =)?

I hope my description is sufficient - otherwise I can provide some 
example code but I think it's quite a straightforward problem.

Regards,

Matthias

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


html:errors location

2002-12-13 Thread Joao Araujo


Hi,

According to the TIP " Don't settle for  " at 
http://husted.com/struts/tips/index.html,
from Ted Husted I can add  an error  by the side of the property 
that caused it.

something like this:
To specify that this message is for the "username" 
property, we would code this instead:

errors.add(
  "username", new ActionError("error.username.required"));

If we specify a property, we can use the  
tag (or any of the alternatives) like this:

Username: 
Password: 

I Did exactly this. Unfortunately, the error does not appear by 
the side of the input. But,
It appears at page top when I use the   tag.

What should I do to put it by the side of an input ()?


Thanks in advance.
Joao,


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors location

2002-12-13 Thread Joao Araujo
Hi,

	According to the TIP " Don't settle for  " at 
http://husted.com/struts/tips/index.html,
	from Ted Husted I can add  an error  by the side of the property that 
caused it.

	something like this:
		To specify that this message is for the "username" property, we would 
code this instead:

		errors.add(
		  "username", new ActionError("error.username.required"));

		If we specify a property, we can use the  tag (or any of 
the alternatives) like this:

		Username: 
		Password: 

	I Did exactly this. Unfortunately, the error does not appear by the side 
of the input. But,
	It appears at page top when I use the   tag.

	What should I do to put it by the side of an input ()?


	Thanks in advance.
Joao,


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



html:errors & ActionErrors.GLOBAL_ERROR

2002-12-16 Thread Vijay Balakrishnan
Hi,

I am doing the following in the first Action:
ActionErrors errors = new ActionErrors();
   errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("individual.backbutton.error")); 
   return forward; 

I am forwarding to another Action which in turn forwards to another
Action.This last Action then forwards to a jsp page.I am displaying a
 in the final jsp page and want to display the error message
set in the first action. 

Right now,the jsp page doesn't show the error message.How can i get the
message displayed ? 

Thanx,
Vijay


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:errors

2002-07-16 Thread Jan Vervecken

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-mail:   
For additional commands, e-mail: 




RE: html:errors

2002-07-16 Thread wbchmura


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 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-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>



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




RE: html:errors

2002-07-16 Thread Rene Eigenheer

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]
> [mailto:[EMAIL PROTECTED]]
> Sent: Dienstag, 16. Juli 2002 15:40
> To: [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]]
> 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 approach, or is it
> possible with existing Struts tags?
>
> tnx
> -Jan
>
> >>> [EMAIL PROTECTED] 11-07-02 16:37 >>>
>
> Like so?
>
> 
> 
> 
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


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




RE: html:errors

2002-07-16 Thread wbchmura


So what you are looking to do is to display text with a different style 
if it is an error?












I am too familiar with setting an error to a specific field though...  
maybe thats what you are looking for?


-Original Message-
From: reigenheer [mailto:[EMAIL PROTECTED]]
Sent: 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]
> [mailto:[EMAIL PROTECTED]]
> Sent: Dienstag, 16. Juli 2002 15:40
> To: [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]]
> 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 approach, or is it
> possible with existing Struts tags?
>
> tnx
> -Jan
>
> >>> [EMAIL PROTECTED] 11-07-02 16:37 >>>
>
> Like so?
>
> 
> 
> 
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


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



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




RE: html:errors

2002-07-16 Thread Jan Vervecken

ah ... "Since : Struts 1.1" ... sorry, I checked some older documentation

tnx
-Jan

>>> [EMAIL PROTECTED] 16-07-02 15:39 >>>

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 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-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>



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



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




RE: html:errors

2002-07-16 Thread wbchmura


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 ... "Since : Struts 1.1" ... sorry, I checked some older 
documentation

tnx
-Jan

>>> [EMAIL PROTECTED] 16-07-02 15:39 >>>

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 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-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>



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



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



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




html:errors tag?

2001-07-18 Thread Matthias Brahm

Hi,

is it possible to do something like this with struts:

I have a form with labels for the input fields.
These labels have the font color blue.

The Form is validated by the FormBean.
When one or more fields of the form are invalid
and the control is forwarded back to the input form,
the labels of the invalid input fields should have the font color red.

In general, is it possible to output one text and in case of an error 
another one?

Can I do this with the struts-tag-libs (html:errors)?

Thanls




html:errors tag

2001-01-29 Thread nic.hobbs



Memo from Nic Hobbs of PricewaterhouseCoopers

 Start of message text 

I am using the nightly build from about Wednesday last week so let me know if I
should just get the latest one (which I intend to do tomorrow anyway) but...


Using the  seems to be exactly the same as doing
 as I get all the errors printed out rather than just the error
printed for the particular property. Can anyone explain what I am doing wrong?

Many thanks,

Nic

- End of message text 

The principal place of business of PricewaterhouseCoopers and its associate
partnerships is 1 Embankment Place, London WC2N 6NN where lists of the
partners' names are available for inspection. All partners in the associate
partnerships are authorised to conduct business as agents of, and all
contracts for services to clients are with, PricewaterhouseCoopers. The UK
firm of PricewaterhouseCoopers is authorised by the Institute of Chartered
Accountants in England and Wales to carry on investment business.
PricewaterhouseCoopers is a member of the world-wide
PricewaterhouseCoopers organisation.

The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material.  Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited.   If you received this in error, please
contact the sender and delete the material from any computer.





Re: html:errors

2001-03-27 Thread Martin Cooper

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 
fully dynamic generation.

The  tag does indeed have applicable attributes. See the 
documentation for information on what they are and how to use them:

http://jakarta.apache.org/struts/struts-html.html#errors

Hope this helps.

--
Martin Cooper


At 02:35 PM 3/26/01, Suriyanarayanan, Senthil Kumar wrote:
>Hello,
> How do I generate error messages dynamically. Say for example if the
>error property is not
>predefined in the ApplicationResources.properties. Also does 
>takes any arguments?
>If it takes some arguments how can I use it? Also is it possible to have
>multiple  with
>in the same jsp file.
>
>
>Thanks in advance.
>Senthil Kumar.S
>
>**
>The Information transmitted herewith is sensitive information intended only
>for use to the individual or entity to which it is addressed. If the reader
>of this message is not the intended recipient, you are hereby notified that
>any review, retransmission, dissemination, distribution, copying or other
>use of, or taking of any action in reliance upon, this information is
>strictly prohibited. If you have received this communication in error,
>please contact the sender and delete the material from your computer.





Re: html:errors

2001-10-19 Thread Jonathan Asbell

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]>
Sent: Friday, October 19, 2001 7:10 AM
Subject: html:errors


> Hi,
>
> COULD you help me!
> Is there a possibility to write the ONLY the error for a CERTAIN property
of
> a FormBean out at a possition where I want it?
> I have something in mind where I have a form with different inputfields
and
> if a field has a wrong value than I have a message under that field wich
> tells me what is wrong!
> Does someone has a (complete) example how I can mannage that? I think I
saw
> that some time ago but I dont know where anymore and for what I should
> search for!
>
> MANY thanks!
>




Re: html:errors

2001-10-19 Thread David Winterfeldt

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.

ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR,
   new
ActionError("error.password.mismatch"));
errors.add("username",
   new ActionError("error.username"));

IN YOUR RESULTING JSP PAGE


Or if you are using a recent nightly build you can
iterate through your error messages helping to keep
html out of your message resources.


   
  
 
  
   


David

--- Jonathan Asbell <[EMAIL PROTECTED]> wrote:
> 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]>
> Sent: Friday, October 19, 2001 7:10 AM
> Subject: html:errors
> 
> 
> > Hi,
> >
> > COULD you help me!
> > Is there a possibility to write the ONLY the error
> for a CERTAIN property
> of
> > a FormBean out at a possition where I want it?
> > I have something in mind where I have a form with
> different inputfields
> and
> > if a field has a wrong value than I have a message
> under that field wich
> > tells me what is wrong!
> > Does someone has a (complete) example how I can
> mannage that? I think I
> saw
> > that some time ago but I dont know where anymore
> and for what I should
> > search for!
> >
> > MANY thanks!
> >
> 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



html:errors handling

2001-12-17 Thread Frédéric Houbie - ABSIS-GROUP

Hi,

I have a strange behaviour in my application. in my logonaction, I do some
check, when error occurs, I use errors.add(xxx, "yyy") to set some errors.
But when I use  tag to display it, I get "null My_Error null",
so my error message is preceded by null text et followed by null text. I
don't understand where it comes from. I display errors.size() and it returns
my 1, so there is only one record in it.

any idea ?

Frederic



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors error?

2002-01-16 Thread Frank Lawlor

I just noticed that my error messages are acting strange.
I recently changed to a nightly build (approx 1/2).
For example, instead of getting the text:
  You must specify a Contact Name. 
I am now getting:
  null You must specify a Contact Name. null 
There are no substitution parms in the properties spec:
  error.no_contact_name=You must specify a Contact Name.
The html generated almost looks like there are two
null error entries:

null
You must specify a Contact Name.
null

but when I add my message the error array is empty.

Anyone else on a nightly build noticed any funny error messages?

Thanks,

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors / html:messages

2002-06-04 Thread Peter Onthrops


I am trying to display error messages for properties in a list. The property key in 
the messages object is object[0].property. Is there support to display these message 
individually?

Thanks,

P.



-
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup


RE: html:errors

2002-07-11 Thread Kamholz, Keith (corp-staff) USX

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 user to
the input page defined in struts-config.  On that page, just use an
 tag.  If there were no errors, nothing will be displayed.  If
there were errors, they are displayed there.  It's pretty simple, another
one of those things that struts handles automatically.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 8:17 AM
To: [EMAIL PROTECTED]
Subject: html:errors


How do I check on the jsp if some error occured?

If an error occured I wanna display a Dialog with the errormessages inside
when the page gets reloaded.



Hanel Matthias
Fachinformatiker (Anwendungsentwicklung) in Ausbildung
Logistik World GmbH Fon:+49-841-9014-300
Marie-Curie-Strasse 6   Fax:+49-841-9014-302 
D- 85055 Ingolstadt mailto:[EMAIL PROTECTED]




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

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




AW: html:errors

2002-07-11 Thread mhanel

Yes I know. Probably my question was wrong.
Can I use the  tag with some 
 tags?
like


Do Some stuff for errors.



-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
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 user to
the input page defined in struts-config.  On that page, just use an
 tag.  If there were no errors, nothing will be displayed.  If
there were errors, they are displayed there.  It's pretty simple, another
one of those things that struts handles automatically.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 8:17 AM
To: [EMAIL PROTECTED]
Subject: html:errors


How do I check on the jsp if some error occured?

If an error occured I wanna display a Dialog with the errormessages inside
when the page gets reloaded.



Hanel Matthias
Fachinformatiker (Anwendungsentwicklung) in Ausbildung
Logistik World GmbH Fon:+49-841-9014-300
Marie-Curie-Strasse 6   Fax:+49-841-9014-302 
D- 85055 Ingolstadt mailto:[EMAIL PROTECTED]




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

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

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




RE: html:errors

2002-07-11 Thread Kamholz, Keith (corp-staff) USX

Hmmm
I haven't done it myself, but I don't see why you couldn't.  It seems like
it would work fine.  However, I have had problems with the
 and  tags when trying to
display something if a collection is empty.  It made me lose faith in the
tag, so now I use the  tag for these types of
situations (with a preceding  tag for collections).  Did you try
your idea yet?  Like I said, it seems like it should work just fine.
However, I am new to all this, so if I'm wrong, somebody correct me.

~ Keith
http://www.buffalo.edu/~kkamholz


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 8:50 AM
To: [EMAIL PROTECTED]
Subject: AW: html:errors


Yes I know. Probably my question was wrong.
Can I use the  tag with some 
 tags?
like


Do Some stuff for errors.



-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
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 user to
the input page defined in struts-config.  On that page, just use an
 tag.  If there were no errors, nothing will be displayed.  If
there were errors, they are displayed there.  It's pretty simple, another
one of those things that struts handles automatically.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 8:17 AM
To: [EMAIL PROTECTED]
Subject: html:errors


How do I check on the jsp if some error occured?

If an error occured I wanna display a Dialog with the errormessages inside
when the page gets reloaded.



Hanel Matthias
Fachinformatiker (Anwendungsentwicklung) in Ausbildung
Logistik World GmbH Fon:+49-841-9014-300
Marie-Curie-Strasse 6   Fax:+49-841-9014-302 
D- 85055 Ingolstadt mailto:[EMAIL PROTECTED]




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

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

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

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




RE: html:errors

2002-07-11 Thread wbchmura


Like so?





-Original Message-
From: mhanel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 8:50 AM
To: struts-user
Subject: AW: html:errors


Yes I know. Probably my question was wrong.
Can I use the  tag with some 
 tags?
like


Do Some stuff for errors.



-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
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 user 
to
the input page defined in struts-config.  On that page, just use an
 tag.  If there were no errors, nothing will be displayed. 
 If
there were errors, they are displayed there.  It's pretty simple, 
another
one of those things that struts handles automatically.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 8:17 AM
To: [EMAIL PROTECTED]
Subject: html:errors


How do I check on the jsp if some error occured?

If an error occured I wanna display a Dialog with the errormessages 
inside
when the page gets reloaded.




Hanel Matthias
Fachinformatiker (Anwendungsentwicklung) in Ausbildung
Logistik World GmbH Fon:+49-841-9014-300
Marie-Curie-Strasse 6   Fax:+49-841-9014-302 
D- 85055 Ingolstadt mailto:[EMAIL PROTECTED]





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

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

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



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




Re: html:errors

2002-07-11 Thread @Basebeans.com

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
Software Developer
Jibe, Inc.
http://www.jibeinc.com


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




RE: html:errors

2002-07-11 Thread Kamholz, Keith (corp-staff) USX

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.  It
creates a very nice display.  Some consider it bad practice to use html in
your properties file, but others such as myself don't have 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]>
 ===
[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
Software Developer
Jibe, Inc.
http://www.jibeinc.com


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

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




RE: html:errors

2002-07-11 Thread wbchmura

If you have the HTML in the resources file, you are stuck with that font 
across the whole application I would think.  For a form or something its 
not bad because you are only going to use that error in one place.  But 
with general errors or messages, you may want the information to be 
displayed differently depending what page its being displayed on.

of course after reading and trying to implement best practices for the 
past two months in struts, I am starting to wonder if a "Just do it / 
damn the torpedos" approach is not a bad idea!  Do it the quickest, 
fastest way.

-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.  
It
creates a very nice display.  Some consider it bad practice to use html 
in
your properties file, but others such as myself don't have 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]>
 ===
[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
Software Developer
Jibe, Inc.
http://www.jibeinc.com


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

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



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




RE: html:errors

2002-07-11 Thread Kamholz, Keith (corp-staff) USX

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 programmers will
need to do.  I know it fulfills my needs just fine, so I have no
reservations about putting the html in the resources file.

I know exactly what you mean about the "best practices".  Sometimes they are
much more trouble than they are worth.  If what I do gets the job done well,
it doesn't have to be elegant.

~ Keith
http://www.buffalo.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.  For a form or something its 
not bad because you are only going to use that error in one place.  But 
with general errors or messages, you may want the information to be 
displayed differently depending what page its being displayed on.

of course after reading and trying to implement best practices for the 
past two months in struts, I am starting to wonder if a "Just do it / 
damn the torpedos" approach is not a bad idea!  Do it the quickest, 
fastest way.

-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.  
It
creates a very nice display.  Some consider it bad practice to use html 
in
your properties file, but others such as myself don't have 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]>
 ===
[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
Software Developer
Jibe, Inc.
http://www.jibeinc.com


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

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



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

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




RE: html:errors

2002-07-11 Thread wbchmura


I've been struggling lately with one of the "methodologies" practice of 
not progamming for the future, but coming back and refactoring when you 
need to do that.

Much self beating going on...

-Original Message-
From: kkamholz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 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 programmers 
will
need to do.  I know it fulfills my needs just fine, so I have no
reservations about putting the html in the resources file.

I know exactly what you mean about the "best practices".  Sometimes they 
are
much more trouble than they are worth.  If what I do gets the job done 
well,
it doesn't have to be elegant.

~ Keith
http://www.buffalo.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.  For a form or something its 

not bad because you are only going to use that error in one place.  But 
with general errors or messages, you may want the information to be 
displayed differently depending what page its being displayed on.

of course after reading and trying to implement best practices for the 
past two months in struts, I am starting to wonder if a "Just do it / 
damn the torpedos" approach is not a bad idea!  Do it the quickest, 
fastest way.

-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.  

It
creates a very nice display.  Some consider it bad practice to use html 
in
your properties file, but others such as myself don't have 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]>
 ===
[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
Software Developer
Jibe, Inc.
http://www.jibeinc.com


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

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



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

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



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




Re: html:errors tag..

2003-09-15 Thread koen boutsen
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"));
}

return errors;
}

In the applicationResources.properties, you have to add the message : 
adresses.insertUser.noUser=You have to give a userId

This should work.

Why don't you try the validator framework. You don't have to create an ActionForm for 
each jsp you create.

Koen Boutsen

- Original Message -

DATE: Mon, 15 Sep 2003 10:22:27
From: Ritvik <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: 

>Hi There,
>
>I am using  tag at top of my page to display any
>validation errors when a form is submitted, but for some reason, I
>couldn't see any errors message even I have left some mandatory fields
>blank. I am not getting any errors in server log as well.
>
>I have added the validation logic in validate() method of ActionForm
>subclass. I think Struts adds ActionErrors object in the request\session
>scope with a know key, can anyone let me know the exaclt key name?
>
>What would be the best way test errors using Struts?
>
>thanks,
>Ritvik
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>




Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

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



Re: html:errors tag..

2003-09-15 Thread Louise Pryor

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 any errors in server log as well.

R> I have added the validation logic in validate() method of ActionForm
R> subclass. I think Struts adds ActionErrors object in the request\session
R> scope with a know key, can anyone let me know the exaclt key name?

Are you sure you are actually calling the validate() method?  Either
validate="true"  in the action definition or call the validate()
method explicitly in the execute() method of the action as follows:

errors = myForm.validate(mapping, request);
// see if we found any validation errors
if ( ! errors.isEmpty()) {
saveErrors(request, errors);
return (new ActionForward(mapping.getInput()));
} // end of if ()


-- 
Louise Pryor
http://www.louisepryor.com



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



html:errors break line

2004-01-16 Thread Vinicius Carvalho
Hi there! I have a page that renders all my erros, called 
errors.jsp (duh!). What I'm trying to do is if the user's session has 
expired, I'll forward him using a javascript, after an alert: Here's how my 
code looks like:


function sessionExpired(){
alert("<html:errors property="sessionExpiredString"/>");
top.frames.location="index.jsp";
}
function refreshScreen() {
<html:errors property="sessionExpiredFunction"/>
}

Now, let's suppose the session has expired: the code displays this:


function sessionExpired(){
alert("
Session expired! Please login again!</pre><br>
<pre style="margin: 0em;">");
top.frames.location="index.jsp";
}
function refreshScreen() {</pre><br>
<tt>sessionExpired();</tt><br>
<br>
<pre style="margin: 0em;"><br>}

As you can see, errors property sessionExpiredFunction writes the function 
to be called. and the
errosExpiredString, the warning string. Problem is, I have a new line, 
before and after it, invalidating my alert() method.
Any way to solve this? Or maybe a better solution for the problem?

Thanks

Vinicius

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


Re: html:errors location

2002-12-13 Thread Scott Reisdorf
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,
from Ted Husted I can add  an error  by the side of the property 
that caused it.

something like this:
To specify that this message is for the "username" 
property, we would code this instead:

errors.add(
  "username", new ActionError("error.username.required"));

If we specify a property, we can use the  
tag (or any of the alternatives) like this:

Username: 
Password: 

I Did exactly this. Unfortunately, the error does not appear by 
the side of the input. But,
It appears at page top when I use the   tag.

What should I do to put it by the side of an input ()?


Thanks in advance.
Joao,


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:errors location

2002-12-13 Thread Yee, Richard K,,DMDCWEST
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  " at 
> http://husted.com/struts/tips/index.html,
>   from Ted Husted I can add  an error  by the side of the property
> that 
> caused it.
> 
>   something like this:
>   To specify that this message is for the "username" property,
> we would 
> code this instead:
> 
>   errors.add(
> "username", new ActionError("error.username.required"));
> 
>   If we specify a property, we can use the  tag
> (or any of 
> the alternatives) like this:
> 
>   Username: 
>   Password: 
> 
>   I Did exactly this. Unfortunately, the error does not appear by the
> side 
> of the input. But,
>   It appears at page top when I use the   tag.
> 
>   What should I do to put it by the side of an input ( property/>)?
> 
> 
>   Thanks in advance.
> Joao,
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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




RE: html:errors location

2002-12-13 Thread Joao Araujo
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 TIP " Don't settle for  " at
> http://husted.com/struts/tips/index.html,
>   from Ted Husted I can add  an error  by the side of the property
> that
> caused it.
>
>   something like this:
>   To specify that this message is for the "username" property,
> we would
> code this instead:
>
>   errors.add(
> "username", new ActionError("error.username.required"));
>
>   If we specify a property, we can use the  tag
> (or any of
> the alternatives) like this:
>
>   Username: 
>   Password: 
>
>   I Did exactly this. Unfortunately, the error does not appear by the
> side
> of the input. But,
>   It appears at page top when I use the   tag.
>
>   What should I do to put it by the side of an input ( property/>)?
>
>
>   Thanks in advance.
> Joao,
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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



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




RE: html:errors & ActionErrors.GLOBAL_ERROR

2002-12-17 Thread Sri Sankaran
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 following in the first Action:
ActionErrors errors = new ActionErrors();
   errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("individual.backbutton.error")); 
   return forward; 

I am forwarding to another Action which in turn forwards to another Action.This last 
Action then forwards to a jsp page.I am displaying a  in the final jsp 
page and want to display the error message set in the first action. 

Right now,the jsp page doesn't show the error message.How can i get the message 
displayed ? 

Thanx,
Vijay


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


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




RE: html:errors & ActionErrors.GLOBAL_ERROR

2002-12-17 Thread Vijay Balakrishnan
Hi,

I tried using saveErrors(request,errors) in the 1st action.But the 2nd
action to which it is forwarded doesn't seem to get the error.

Here is my code in the 2nd action:

while (enum.hasMoreElements()){
Object obj = enum.nextElement();
count++;
log.debug("obj is:"+obj+" count:"+count);
 
log.debug("request.getAttribute:"+request.getAttribute(obj.toString()));
//this returns 3 objects-ApplicationConfig,ActionConfig and
PropertyMessageResources
}

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 List
Subject: RE: html:errors & ActionErrors.GLOBAL_ERROR


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 following in the first Action:
ActionErrors errors = new ActionErrors();
   errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("individual.backbutton.error")); 
   return forward; 

I am forwarding to another Action which in turn forwards to another
Action.This last Action then forwards to a jsp page.I am displaying a
 in the final jsp page and want to display the error message
set in the first action. 

Right now,the jsp page doesn't show the error message.How can i get the
message displayed ? 

Thanx,
Vijay


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


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

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




RE: html:errors & ActionErrors.GLOBAL_ERROR

2002-12-18 Thread Sri Sankaran
I don't understand the code snippet you have sent.  What is the enumeration?

Are you *forwarding* to the second action or are you *redirecting*?  The latter, as 
you know, will result in a new request being issued by the browser effectively 
throwing away your errors.

As an aside, chaining of actions is not a good idea.  Extracting your business logic 
out of the action classes should obviate the need for this technique.

Sri

-Original Message-
From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 6:03 PM
To: 'Struts Users Mailing List'
Subject: RE: html:errors & ActionErrors.GLOBAL_ERROR


Hi,

I tried using saveErrors(request,errors) in the 1st action.But the 2nd action to which 
it is forwarded doesn't seem to get the error.

Here is my code in the 2nd action:

while (enum.hasMoreElements()){
Object obj = enum.nextElement();
count++;
log.debug("obj is:"+obj+" count:"+count);
 
log.debug("request.getAttribute:"+request.getAttribute(obj.toString()));
//this returns 3 objects-ApplicationConfig,ActionConfig and PropertyMessageResources
}

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 List
Subject: RE: html:errors & ActionErrors.GLOBAL_ERROR


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 following in the first Action:
ActionErrors errors = new ActionErrors();
   errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("individual.backbutton.error")); 
   return forward; 

I am forwarding to another Action which in turn forwards to another Action.This last 
Action then forwards to a jsp page.I am displaying a  in the final jsp 
page and want to display the error message set in the first action. 

Right now,the jsp page doesn't show the error message.How can i get the message 
displayed ? 

Thanx,
Vijay


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


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

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


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




html:errors tag lost?

2003-06-10 Thread Gregory F. March

While playing with Kevin's action input= suggestion, I found I needed
to mess with the redirect= values.  If I set redirect=true, my
relative paths work fine.

However, I am using the html:errors tag and it seems that it has
gotten "lost", i.e. I do not get my validation errors displayed.

I'm still not entirely clear on how the html:errors tag works, but I
have this in my tile jsp:





And when I have redirect=false, I get things like "Password is
required" in the html, but the url is my .do and my relative paths
don't work and I can't see my images.  When it is true, I don't get
the error text (but the url is what I want and the paths are just fine
- I can see my images).

Sorry for all the questions... Hopefully I'll be able to answer a few
myself some day...

Thanks,

/greg

--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

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



RE: html:errors tag?

2001-07-18 Thread Gogineni, Pratima

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 cell is colored red.

Pratima



-Original Message-
From: Matthias Brahm [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 9:25 AM
To: '[EMAIL PROTECTED]'
Subject: html:errors tag?


Hi,

is it possible to do something like this with struts:

I have a form with labels for the input fields.
These labels have the font color blue.

The Form is validated by the FormBean.
When one or more fields of the form are invalid
and the control is forwarded back to the input form,
the labels of the invalid input fields should have the font color red.

In general, is it possible to output one text and in case of an error 
another one?

Can I do this with the struts-tag-libs (html:errors)?

Thanls



Re: html:errors tag?

2001-07-18 Thread David Winterfeldt

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 been set for the 'name' property.



David

--- Matthias Brahm <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> is it possible to do something like this with
> struts:
> 
> I have a form with labels for the input fields.
> These labels have the font color blue.
> 
> The Form is validated by the FormBean.
> When one or more fields of the form are invalid
> and the control is forwarded back to the input form,
> the labels of the invalid input fields should have
> the font color red.
> 
> In general, is it possible to output one text and in
> case of an error 
> another one?
> 
> Can I do this with the struts-tag-libs
> (html:errors)?
> 
> Thanls
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: html:errors tag?

2001-07-18 Thread David Winterfeldt

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/~dwinterfeldt

--- "Gogineni, Pratima" <[EMAIL PROTECTED]>
wrote:
> 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 cell is colored red.
> 
> Pratima
> 
> 
> 
> -Original Message-
> From: Matthias Brahm [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 9:25 AM
> To: '[EMAIL PROTECTED]'
> Subject: html:errors tag?
> 
> 
> Hi,
> 
> is it possible to do something like this with
> struts:
> 
> I have a form with labels for the input fields.
> These labels have the font color blue.
> 
> The Form is validated by the FormBean.
> When one or more fields of the form are invalid
> and the control is forwarded back to the input form,
> the labels of the invalid input fields should have
> the font color red.
> 
> In general, is it possible to output one text and in
> case of an error 
> another one?
> 
> Can I do this with the struts-tag-libs
> (html:errors)?
> 
> Thanls


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: html:errors tag

2001-01-30 Thread Howard Moore

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 Hobbs of PricewaterhouseCoopers
> 
>  Start of message text 
> 
> I am using the nightly build from about Wednesday last week 
> so let me know if I
> should just get the latest one (which I intend to do tomorrow 
> anyway) but...
> 
> 
> Using the  seems to be exactly 
> the same as doing
>  as I get all the errors printed out rather 
> than just the error
> printed for the particular property. Can anyone explain what 
> I am doing wrong?
> 
> Many thanks,
> 
> Nic
> 
> - End of message text 
> 
> The principal place of business of PricewaterhouseCoopers and 
> its associate
> partnerships is 1 Embankment Place, London WC2N 6NN where lists of the
> partners' names are available for inspection. All partners in 
> the associate
> partnerships are authorised to conduct business as agents of, and all
> contracts for services to clients are with, 
> PricewaterhouseCoopers. The UK
> firm of PricewaterhouseCoopers is authorised by the Institute 
> of Chartered
> Accountants in England and Wales to carry on investment business.
> PricewaterhouseCoopers is a member of the world-wide
> PricewaterhouseCoopers organisation.
> 
> The information transmitted is intended only for the person 
> or entity to which
> it is addressed and may contain confidential and/or 
> privileged material.  Any
> review, retransmission, dissemination or other use of, or 
> taking of any action
> in reliance upon, this information by persons or entities 
> other than the
> intended recipient is prohibited.   If you received this in 
> error, please
> contact the sender and delete the material from any computer.
> 
> 



RE: html:errors tag

2001-01-30 Thread nic.hobbs



Memo from Nic Hobbs of PricewaterhouseCoopers

 Start of message text 

Thought this might be the case!

Many thanks,

Nic





Howard Moore <[EMAIL PROTECTED]> on 30/01/2001 08:59:18

Please respond to [EMAIL PROTECTED]
To:   "'[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 January 2001 18:59
> To: [EMAIL PROTECTED]
> Subject: html:errors tag
>
>
>
>
> Memo from Nic Hobbs of PricewaterhouseCoopers
>
>  Start of message text 
>
> I am using the nightly build from about Wednesday last week
> so let me know if I
> should just get the latest one (which I intend to do tomorrow
> anyway) but...
>
>
> Using the  seems to be exactly
> the same as doing
>  as I get all the errors printed out rather
> than just the error
> printed for the particular property. Can anyone explain what
> I am doing wrong?
>
> Many thanks,
>
> Nic
>
> - End of message text 
>
> The principal place of business of PricewaterhouseCoopers and
> its associate
> partnerships is 1 Embankment Place, London WC2N 6NN where lists of the
> partners' names are available for inspection. All partners in
> the associate
> partnerships are authorised to conduct business as agents of, and all
> contracts for services to clients are with,
> PricewaterhouseCoopers. The UK
> firm of PricewaterhouseCoopers is authorised by the Institute
> of Chartered
> Accountants in England and Wales to carry on investment business.
> PricewaterhouseCoopers is a member of the world-wide
> PricewaterhouseCoopers organisation.
> 
> The information transmitted is intended only for the person
> or entity to which
> it is addressed and may contain confidential and/or
> privileged material.  Any
> review, retransmission, dissemination or other use of, or
> taking of any action
> in reliance upon, this information by persons or entities
> other than the
> intended recipient is prohibited.   If you received this in
> error, please
> contact the sender and delete the material from any computer.
>
>


- End of message text 

The principal place of business of PricewaterhouseCoopers and its associate
partnerships is 1 Embankment Place, London WC2N 6NN where lists of the
partners' names are available for inspection. All partners in the associate
partnerships are authorised to conduct business as agents of, and all
contracts for services to clients are with, PricewaterhouseCoopers. The UK
firm of PricewaterhouseCoopers is authorised by the Institute of Chartered
Accountants in England and Wales to carry on investment business.
PricewaterhouseCoopers is a member of the world-wide
PricewaterhouseCoopers organisation.

The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material.  Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited.   If you received this in error, please
contact the sender and delete the material from any computer.





Javascruot with html:errors

2001-09-23 Thread Francois Duchaussoy

Hi,

Would anyone know how to call a javascript method from a  tag?
Basically I would like to highlight a field where an error occurs...

Any ideas??
Francois.



html:errors and redirection

2001-10-22 Thread Heijink, Dick



Hi 
there,
 
We've 
been using struts for our projects and we've run into some problems with error 
reporting. We have the following action:
 
public 
ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest 
request,HttpServletResponse response) {
  
ActionErrors errors=new ActionErrors();
  
...
  
saveErrors(request,errors);
  
return mapping.findForward("success")
}
 
The 
problem is that the "success" forward uses redirection. We have to do this, 
because Navigator doesn't allow you to view the source or to print a page that 
resulted from a POST whose data expires immediately. However, when the request 
is redirected, we loose the detected errors that were added to the POSTed 
request. The page for the redirected GET request will therefore not display any 
detected errors.
 
Any 
ideas? Are we doing something fundamentally wrong?
 
We've 
got a workaround with an alternative errors tag that fetches the errors from the 
session and not from the request, but this solution is not robust enough. We 
assume that the request that follows the POST request is the redirected request, 
but there is no way of knownig this for sure.
 
Thanks,
 
Dick 
Heijink


RE: html:errors handling

2001-12-17 Thread Barry Jia

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 my logonaction, I do some
check, when error occurs, I use errors.add(xxx, "yyy") to set some errors.
But when I use  tag to display it, I get "null My_Error null",
so my error message is preceded by null text et followed by null text. I
don't understand where it comes from. I display errors.size() and it returns
my 1, so there is only one record in it.

any idea ?

Frederic



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



RE: html:errors handling

2001-12-17 Thread Jesse Alexander (KABS 11)

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 handling


Hi,

I have a strange behaviour in my application. in my logonaction, I do some
check, when error occurs, I use errors.add(xxx, "yyy") to set some errors.
But when I use  tag to display it, I get "null My_Error null",
so my error message is preceded by null text et followed by null text. I
don't understand where it comes from. I display errors.size() and it returns
my 1, so there is only one record in it.

any idea ?

Frederic



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

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




RE: html:errors handling

2001-12-17 Thread Keith Bacon

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 versions).
Keith. 




--- Barry Jia <[EMAIL PROTECTED]> wrote:
> 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 my
> logonaction, I do some
> check, when error occurs, I use errors.add(xxx,
> "yyy") to set some errors.
> But when I use  tag to display it, I
> get "null My_Error null",
> so my error message is preceded by null text et
> followed by null text. I
> don't understand where it comes from. I display
> errors.size() and it returns
> my 1, so there is only one record in it.
> 
> any idea ?
> 
> Frederic
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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




RE: html:errors handling

2001-12-17 Thread Frederic Houbie - ABSIS-GROUP

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
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 versions).
Keith.




--- Barry Jia <[EMAIL PROTECTED]> wrote:
> did you set your error text in your application
> resource file ?
>
> -Original Message-
> From: Fridiric 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 my
> logonaction, I do some
> check, when error occurs, I use errors.add(xxx,
> "yyy") to set some errors.
> But when I use  tag to display it, I
> get "null My_Error null",
> so my error message is preceded by null text et
> followed by null text. I
> don't understand where it comes from. I display
> errors.size() and it returns
> my 1, so there is only one record in it.
>
> any idea ?
>
> Frederic
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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



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




RES: html:errors error?

2002-01-16 Thread Rubens Gama

you must define in ApplicationResourses.properties:

error.header=""
error.footer=""

the problem is solved.
ok?

-Mensagem original-
De: Frank Lawlor [mailto:[EMAIL PROTECTED]]
Enviada em: quarta-feira, 16 de janeiro de 2002 15:15
Para: Struts (E-mail)
Assunto: html:errors error?


I just noticed that my error messages are acting strange.
I recently changed to a nightly build (approx 1/2).
For example, instead of getting the text:
  You must specify a Contact Name.
I am now getting:
  null You must specify a Contact Name. null
There are no substitution parms in the properties spec:
  error.no_contact_name=You must specify a Contact Name.
The html generated almost looks like there are two
null error entries:

null
You must specify a Contact Name.
null

but when I add my message the error array is empty.

Anyone else on a nightly build noticed any funny error messages?

Thanks,

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




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




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




Re: html:errors error?

2002-01-20 Thread Ted Husted

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.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


Frank Lawlor wrote:
> 
> I just noticed that my error messages are acting strange.
> I recently changed to a nightly build (approx 1/2).
> For example, instead of getting the text:
>   You must specify a Contact Name.
> I am now getting:
>   null You must specify a Contact Name. null
> There are no substitution parms in the properties spec:
>   error.no_contact_name=You must specify a Contact Name.
> The html generated almost looks like there are two
> null error entries:
> 
> null
> You must specify a Contact Name.
> null
> 
> but when I add my message the error array is empty.
> 
> Anyone else on a nightly build noticed any funny error messages?
> 
> Thanks,
> 
> Frank Lawlor
> Athens Group, Inc.
> (512) 345-0600 x151
> Athens Group, an employee-owned consulting firm integrating technology
> strategy and software solutions.
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: AW: html:errors

2002-07-11 Thread @Basebeans.com

Subject: Re: AW: html:errors
From: Eric Rizzo <[EMAIL PROTECTED]>
 ===
[EMAIL PROTECTED] wrote:
> Yes I know. Probably my question was wrong.
> Can I use the  tag with some 
>  tags?
> like
> 
> 
>   Do Some stuff for errors.
> 

I use

<%@ page import="org.apache.struts.action.Action" %>

...


to render parts of the page that should not be shown if there are 
errors.  You could do the opposite with 

HTH,
Eric
-- 
Eric Rizzo
Software Developer
Jibe, Inc.
http://www.jibeinc.com


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




html:errors breakline (version 2)

2004-01-16 Thread Vinicius Carvalho
Sorry all! Eudora simply killed my text, sorry, heres the full version

Hi there! I have a page that renders all my erros, called errors.jsp 
(duh!). What I'm trying to do is if the user's session has expired, I'll 
forward him using a javascript, after an alert: Here's how my code looks like:


function sessionExpired(){
alert("<html:errors property="sessionExpiredString"/>");
top.frames.location="index.jsp";
}
function refreshScreen() {
<html:errors property="sessionExpiredFunction"/>
}

Now, let's suppose the session has expired: the code displays this:


function sessionExpired(){
alert("
Session expired! Please login again!</pre><br>
<pre style="margin: 0em;">");
top.frames.location="index.jsp";
}
function refreshScreen() {</pre><br>
<tt>sessionExpired();</tt><br>
<br>
<pre style="margin: 0em;"><br>}

As you can see, errors property sessionExpiredFunction writes the function 
to be called. and the
errosExpiredString, the warning string. Problem is, I have a new line, 
before and after it, invalidating my alert() method.
Any way to solve this? Or maybe a better solution for the problem?

Thanks

Vinicius

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


RE: html:errors tag lost?

2003-06-10 Thread Josh Rayls
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
intact.

-Josh

-Original Message-
From: Gregory F. March [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 3:08 PM
To: Struts Users Mailing List
Subject: html:errors tag lost?



While playing with Kevin's action input= suggestion, I found I needed
to mess with the redirect= values.  If I set redirect=true, my
relative paths work fine.

However, I am using the html:errors tag and it seems that it has
gotten "lost", i.e. I do not get my validation errors displayed.

I'm still not entirely clear on how the html:errors tag works, but I
have this in my tile jsp:





And when I have redirect=false, I get things like "Password is
required" in the html, but the url is my .do and my relative paths
don't work and I can't see my images.  When it is true, I don't get
the error text (but the url is what I want and the paths are just fine
- I can see my images).

Sorry for all the questions... Hopefully I'll be able to answer a few
myself some day...

Thanks,

/greg

--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

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


html:errors tag behaves strangely.

2002-07-28 Thread dave sag

hi people

using struts1.1beta

i want to display my errors such that i get any major errors at the 
top of the page and then any form specific validation errors down 
with my form.  doing this simply was in fact my main motivation for 
migrating to struts.

so i have set up my page and it all works fine.  a simple login form.

My main problem is that the headers are repeated all the way down the 
form, for each error i get a full errors.header and errors.footer 
surely this is a bug. i can't find anything but trivial examples 
online where the errors are all clumped together at the top - not 
what I want.

in my situation there are 3 possible errors, 2 relate to form 
validation and one to business logic.  this is pretty typical 
actually, i recon.

if there are any errors, i want the page to display a generic error 
header, then the overall error (ie error.login.failed) then with my 
form fields any particular errors.

trying this with

 up the top (Login populated by my 
LoginAction) and then

inline in my form  etc

doesn't work. i get too many headers.  if i take the headers out then 
i get no headers anywhere.  i just want the headers at the top 
(obviously) and the footer below the form

something like





...

my form





would seem to make the most sense to me.

i saw a cryptic reference to using  or some such 
tag to do this but the remark seemed kinda off the cuff in the list 
archive/autofaq i was reading, and had no detail.

what is the standard pattern for this style of error handling.  i 
can't be the only one to hit this problem.

is there a URL somewhere that gives a single page view of the struts 
tags and their attributes / example uses?

cheers and thanks in advance

dave


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors and property attribute

2001-01-31 Thread dion

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?
--
dIon Gillard, Multitask Consulting
Work:  http://www.multitask.com.au
NetRexx: http://www.multitask.com.au/NetRexx.nsf




Bug in html:errors/ErrorsTag.java???

2001-03-21 Thread Anthony Milano




In doing some recent 
development using struts I was using 
the  tag with a property attribute.  In other words in 
my JSP page I have something which looks like below:
 

.
.

.
.

.
.

 
If there is a 
"validation" error I see the 
error printed along with the header and footer.  The problem I 
am seeing though is that the header and footer is also generated for the 
"processing" html:errors tag(even if there are not processing errors 
returned).  The processing error section contains a header and footer 
with no error messages listed.
 
The code looks easy 
to modify but I am curious to whether there have been any discussions on this 
subject.
 
Thanks,
Anthony


How to use html:errors ?

2001-03-23 Thread Suriyanarayanan, Senthil Kumar

How do you make the errors shows up on the generated page.? Here is the code
snapshot..

LogonForm.java
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
if(password == null || !password.equals("password"))
{
ActionErrors aes = new ActionErrors();
ActionError ae = new ActionError("Please type the
valid password");
aes.add("?", ae);
return aes;
}
return null;
}
What should I put at the place of '?' in the above add method 

struts-config.xml






  


   

  


logon.jsp



UserId: 
Password: 



I saw one of the postings talking about saveErrors method. It belongs to
Action Object, and I how do
I get reference to action object from the validate method?

Thanks in advance,
Senthil Kumar.S
 
**
The Information transmitted herewith is sensitive information intended only
for use to the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon, this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.



Re: Javascruot with html:errors

2001-09-23 Thread martin . cooper

If I understand what you're asking, it's not possible. JavaScript is
executed at the client (e.g. the browser), while JSP, including the
 tag, is executed on the server.

--
Martin Cooper


- Original Message -
From: "Francois Duchaussoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 23, 2001 9:13 PM
Subject: Javascruot with html:errors


> Hi,
>
> Would anyone know how to call a javascript method from a 
tag?
> Basically I would like to highlight a field where an error occurs...
>
> Any ideas??
> Francois.





Re: Javascruot with html:errors

2001-09-30 Thread Adam Grohs

Martin,
That is correct, the stuts error tag cannot actually invoke a JavaScript
method, however it can write one out to the screen and have the browser
throw such an error at run time of the page.  I will be posting a follow up
thread to explain what throwError() (the JavaScript form my response) might
do with a sample set of code.  Without violating any code ownership issues
for the specific implimentation developed for the site listed below, the
general concept and a sample modified implimentation will be available in a
new thread I am going to post in a few hours.  Please see the "JavaScript
with html:errors - new STRUTS validation" thread coming up very soon, I am
just putting the finishing touches on the files.

Thanks,
Adam S. Grohs
[EMAIL PROTECTED]


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 29, 2001 1:08 PM
Subject: Re: Javascruot with html:errors


> Adam,
>
> This is an interesting idea. I'd certainly be interested in hearing more
> about what throwError() does, and what happens when more than one error
> occurs on a page.
>
> I still claim that you are not actually calling JavaScript from the tag,
> though. You may be generating it, but you're not actually calling it.
> However, perhaps this is what the original poster was asking for. :-)
>
> --
> Martin Cooper
>
>
> - Original Message -
> From: "Adam Grohs" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, September 29, 2001 8:30 AM
> Subject: Re: Javascruot with html:errors
>
>
> > This response is not necessarily true.  It is possible to call a
> particular
> > JavaScript method or function from the  tag.  I worked on
a
> > team from iXL, Inc. and we have just completed a very sophisticated
error
> > handling mechanism for www.hallmarkstories.com that allows errors to be
> > thrown by an action class through the struts error tag and then each
error
> > that is thrown refers to a specific key in the AppResource.properties
file
> > that invokes a Javascript method for throwing a client side error.  This
> > allows both server-side and client-side validation to be handled by one
> set
> > of presentation layer code.  I would be very happy to explain the
details
> > further if you would like more information.
> >
> > Ex.
> > error.header=
> >error.email.invalid=throwError("Please enter a valid email
> > address")
> > error.header=
> >
> > Adam S. Grohs
> >
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, September 24, 2001 12:06 AM
> > Subject: Re: Javascruot with html:errors
> >
> >
> > > If I understand what you're asking, it's not possible. JavaScript is
> > > executed at the client (e.g. the browser), while JSP, including the
> > >  tag, is executed on the server.
> > >
> > > --
> > > Martin Cooper
> > >
> > >
> > > - Original Message -
> > > From: "Francois Duchaussoy" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Sunday, September 23, 2001 9:13 PM
> > > Subject: Javascruot with html:errors
> > >
> > >
> > > > Hi,
> > > >
> > > > Would anyone know how to call a javascript method from a
> 
> > > tag?
> > > > Basically I would like to highlight a field where an error occurs...
> > > >
> > > > Any ideas??
> > > > Francois.
> > >
> > >
> > >
> >
>
>
>



Re: Javascruot with html:errors

2001-10-02 Thread Adam Grohs

Have a look at www.leanonme.org, I have placed a detailed description and
sample the for reference.

Thanks,
Adam S. Grohs
[EMAIL PROTECTED]

- Original Message -
From: "Kwang-Shi Shu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 29, 2001 11:46 AM
Subject: RE: Javascruot with html:errors


> Adam,
>
> Yes, I am interested in learning more. Thanks.
>
> Shu, Kwang-shi  | Tel 732-460-7848
> Village Networks, Inc.  | Fax 732-460-9851
> 246 Industrial Way West |
> Eatontown, NJ 078724| email: [EMAIL PROTECTED]
>
>
> -Original Message-
> From: Adam Grohs [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, September 29, 2001 11:30 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Javascruot with html:errors
>
>
> This response is not necessarily true.  It is possible to call a
particular
> JavaScript method or function from the  tag.  I worked on a
> team from iXL, Inc. and we have just completed a very sophisticated error
> handling mechanism for www.hallmarkstories.com that allows errors to be
> thrown by an action class through the struts error tag and then each error
> that is thrown refers to a specific key in the AppResource.properties file
> that invokes a Javascript method for throwing a client side error.  This
> allows both server-side and client-side validation to be handled by one
set
> of presentation layer code.  I would be very happy to explain the details
> further if you would like more information.
>
> Ex.
> error.header=
>error.email.invalid=throwError("Please enter a valid email
> address")
> error.header=
>
> Adam S. Grohs
>
> - Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 24, 2001 12:06 AM
> Subject: Re: Javascruot with html:errors
>
>
> > If I understand what you're asking, it's not possible. JavaScript is
> > executed at the client (e.g. the browser), while JSP, including the
> >  tag, is executed on the server.
> >
> > --
> > Martin Cooper
> >
> >
> > - Original Message -
> > From: "Francois Duchaussoy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, September 23, 2001 9:13 PM
> > Subject: Javascruot with html:errors
> >
> >
> > > Hi,
> > >
> > > Would anyone know how to call a javascript method from a

> > tag?
> > > Basically I would like to highlight a field where an error occurs...
> > >
> > > Any ideas??
> > > Francois.
> >
> >
> >
>
>





Re: html:errors and redirection

2001-10-22 Thread Matt Raible

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.

Matt

--- "Heijink, Dick" <[EMAIL PROTECTED]> wrote:
> Hi there,
>  
> We've been using struts for our projects and we've run into some problems
> with error reporting. We have the following action:
>  
> public ActionForward perform(ActionMapping mapping,ActionForm
> form,HttpServletRequest request,HttpServletResponse response) {
>   ActionErrors errors=new ActionErrors();
>   ...
>   saveErrors(request,errors);
>   return mapping.findForward("success")
> }
>  
> The problem is that the "success" forward uses redirection. We have to do
> this, because Navigator doesn't allow you to view the source or to print a
> page that resulted from a POST whose data expires immediately. However, when
> the request is redirected, we loose the detected errors that were added to
> the POSTed request. The page for the redirected GET request will therefore
> not display any detected errors.
>  
> Any ideas? Are we doing something fundamentally wrong?
>  
> We've got a workaround with an alternative errors tag that fetches the
> errors from the session and not from the request, but this solution is not
> robust enough. We assume that the request that follows the POST request is
> the redirected request, but there is no way of knownig this for sure.
>  
> Thanks,
>  
> Dick Heijink
> 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



html:errors - highlight affected text field

2002-07-17 Thread Adrian Theuma

Hi,

I am using the  tag to display accumulated errors that were encountered 
on the form after the user submits the form. I would like to be able to highlight the 
text field that has the error.

My life gets complicated further since I am also using nested tags and the names of 
the input fields becomes something of the sort "person[0].child[1].details.name"

Thanks for your help mates.

Adrian

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




redirect html:errors to popup window

2002-02-07 Thread jcanter


Any suggestions on how to redirect  output to a popup window
rather than the page that the form is located on?
Thanks, Jim Canter

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RT expression in html:errors tag

2002-03-08 Thread Jonathan Fuerth

Hi.  I'm trying to do this on a JSP page:


  
  


And my form's validate method adds to the ActionErrors using:
  errors.add("foo"+i, new ActionError("errors.badFoo"));

The problem is, I can get all the error messages back with a simple
 tag, but the above construct doesn't show the error
messages at all.

I have double-checked that I'm using the same error names in the form
validtor and on the jsp.

-- 
Jonathan Fuerth - SQL Power Group Inc.
(416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free)
Unleash the Power of your Corporate Data - http://www.sqlpower.ca/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:errors and property attribute

2001-01-31 Thread Incze Lajos

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?
   a newer version.
 incze



Re: How to use html:errors ?

2001-03-24 Thread Ted Husted

Since Struts is a framework, there a number of inter-related parts that
work together, the error handling is a good example of that. 

When you detect an error in your Action, you need a way to display it to
the user. Since most Actions are not designed to be "views", this is a
problem. 

Struts solves this problem using four (count'em 4) components, the
ActionErrors class, the message resource, the SaveError method, and,
finally, the html:errors tag.

The ActionErrors class is a way to "log" an error. Rather have you embed
a string, the ActionErrors class lets you insert a message resource key.
This is the same resource that bean:message tag uses to provide
internationalization. The SaveError method puts your ActionError class
under a reserved key in the request context, where the html:error tag
can find it. 

In your Action, you would usually have code snippets that look like
this:

// grab a reference to the application resource collection
MessageResources messages = getResources(); 

// create a error message buffer
ActionErrors errors = new ActionErrors();

// process action 
// detect error

if (detect_error) {
errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("error.detected"));
}

// On error, return to input form
if (!errors.empty()) {
saveErrors(request, errors); // put the error(s) where the
htlm:error tag can find them
 return (new ActionForward(mapping.getInput())); // go home
}

If the error concerns a particular field on a form, you might also have
if (field_error) {
errors.add("field name",new ActionError("error.fieldname"));
}

An important thing to realize is that "error.fieldname" is not what the
tag will display. The html:error tag assumes that the strings are the
name of a key in your application's message resource, which might look
like this 

; application.properties
errors.header = 
error.fieldname = Password required
error.detected = Database not available
error.username = That username was not found
errors.footer =

For more complex needs, ActionErrors can also use "replacement values"
to build customized messages, or to build messages from stock phrases. 

For more on these classes, see

< http://jakarta.apache.org/struts/api  > 

"Suriyanarayanan, Senthil Kumar" wrote:
> 
> How do you make the errors shows up on the generated page.? Here is the code
> snapshot..
> 
> LogonForm.java
> public ActionErrors validate(ActionMapping mapping, HttpServletRequest
> request)
> {
> if(password == null || !password.equals("password"))
> {
> ActionErrors aes = new ActionErrors();
> ActionError ae = new ActionError("Please type the
> valid password");
> aes.add("?", ae);
> return aes;
> }
> return null;
> }
> What should I put at the place of '?' in the above add method
> 
> struts-config.xml
> 
> 
> 
> 
> 
>   
> 
> type="package.LogonAction"
>scope="request"
>name="logonForm"
>validate="true"
>input="/logon.jsp">
>
> 
>   
> 
> logon.jsp
> 
> 
> 
> UserId:  redisplay="false" />
> Password:  maxlength="16" redisplay="false" />
> 
> 
> 
> I saw one of the postings talking about saveErrors method. It belongs to
> Action Object, and I how do
> I get reference to action object from the validate method?
> 
> Thanks in advance,
> Senthil Kumar.S



Override the presentation of html:errors

2001-05-01 Thread Jeff Trent



Short of writing my own taglib (which I'd like 
to avoid if I can), how does one iterate over the errors collection to present 
them in a different way.  Any examples would be helpful...
 
Thanks,
Jeff
 


html:errors tag funny null strings

2002-06-20 Thread Jan Fetyko

Hi,

I'm using the  tag to display errors after 
the form validation fails. The problem is that when the error is 
displayed it contains a "null" string at the begining and at the end on 
the actual error message. Ex.: "null Password is required null".

What's going on ? Is this fix-able ?

Jf


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[html:errors] Displaying error with form elements

2003-01-27 Thread Ashish Bansal
Hi!
I am a new bie with Struts trying to figure out a way to display form
errors along with the form elemtn which was the source of the error.
For example, if the form is for new user registration, and it had two
errors - a. User name already exists 
 b. passwords dont match
these would be shown next to the respective form elements where these
were entered.
I am trying to accomplish this usng Struts. This is what I understand
how this could be done:
  For each form tag
analyze the errors collection {
 if error key matches some value (using the logic:) {
   render tag differently
   display the message
 }
}
I am wondering if this is the most efficient way of achieving this? 
Also, can we extend Struts error display such that for every html form
tag, it takes a property displayErrors=true or something to that tune,
which causes the error message to be displayed along with the tag as
the tag is being rendered. Is this extension already planned for
development/exists? Would be interested on working on that because I
think that would a very useful feature.

Looking forward to your thoughts!
-Ashish

=

 Ashish Bansal 
My Home Page



-

To err is human. To forgive is against company policy. 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Property "errors.prefix" not used by HTML:errors ?

2002-09-29 Thread Pel Oliver Kristiansen

Hi all !

Complete newbe trying to get the  to print pretty.
I include the following into my ApplicationResources.properties

errors.header=Feil oppstod!
errors.prefix=*
errors.sufffix=
errors.header=

(ignore the lame tags they are just for testing)

The "errors.header" and "errors.header" are displayed but the 
"errors.prefix" and "errors.sufffix" are not.

(HTML example output:)

Feil oppstod!
Feltet inneholder for mye informasjon
Feltet Navn er ikke utfyllt


Any pointers ?

Pel O. Kristiansen


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at 
http://www.eudoramail.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:errors ActionErrors accessible as scripting variable?

2002-07-15 Thread Chang, Henrique

I have JSP page that should determine whether there are errors or not in
order to display certain parts of the page.
So, is there a way to access the ActionErrors object in a JSP as a scripting
variable, or even better, a tag lib structure so that I can check for the
existence of the ActionErrors instance in the JSP page?

Thanks,
Henrique

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:errors - highlight affected text field

2002-07-17 Thread Galbreath, Mark

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

-Original Message-
From: Adrian Theuma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 4:38 AM

I am using the  tag to display accumulated errors that were
encountered on the form after the user submits the form. I would like to be
able to highlight the text field that has the error.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: redirect html:errors to popup window

2002-02-07 Thread Sean Willson

redirect html:errors to popup windowThe only way I think you could do this
is via JavaScript ... you could use this tag set:

... 

to determine if there are errors, if so open a popup window, save the handle
... and then within this tag:

...

append to that window the error messages. The JavaScript isn't that hard but
that is honestly the only way I think you could do it. It would look
something like this:



var newWindow = open window here with the size and controls you want
<html:messages id="error">
append to the window the contents of '<bean:write name="error"
filter="false"/>'
</html:messages>



Anyone have any other ideas.

Sean

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 3:47 PM
Subject: redirect html:errors to popup window

Any suggestions on how to redirect  output to a popup window
rather than the page that the form is located on?
Thanks, Jim Canter
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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




RE: redirect html:errors to popup window

2002-02-08 Thread Steve Earl

Well,

A slightly different way that we've tried here (I've been scrapping with a
similar issue for a few days now) was to set a 'Window-target' inside the
header on the HttpResponse object when you're within your action class.

Add the following code to your Action class once you've figured out that you
do have some action errors to display

httpResponse.setAttribute("Window-target", "name_of_a_frame");


Under Netscape this causes the page identified by your struts-config file to
be loaded in the target window/frame you've specified. Probably not quite as
flexible as Sean's suggestion but it does seem to work. Unfortunately, it
doesn't work for IE5 (as the Window-target meta tag seems to be Netscape
specific).

More depressing for me is that it doesn't work within Mozilla either, and
that's what my client usesso back to the drawing board.

__ 
Steve Earl

InfoGain Limited, 23-25 Marlow Road, Maidenhead, Berkshire SL6 7AA, UK
email: [EMAIL PROTECTED]
Tel: +44 (0)1628 580 600 
Fax: +44 (0)1628 580 610
Mobile: +44 (0)779 026 3645

Disclaimer:  Neither this e-mail nor any attachment places any legal or
contractual obligations on InfoGain Limited. Any reproduction, disclosure or
dissemination beyond the intended addressees is strictly prohibited save for
the legitimate business purposes of InfoGain Limited and its clients or
partners.
__ 


-Original Message-
From: Sean Willson [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 2:06 AM
To: Struts Users Mailing List
Subject: Re: redirect html:errors to popup window


redirect html:errors to popup windowThe only way I think you could do this
is via JavaScript ... you could use this tag set:

... 

to determine if there are errors, if so open a popup window, save the handle
... and then within this tag:

...

append to that window the error messages. The JavaScript isn't that hard but
that is honestly the only way I think you could do it. It would look
something like this:



var newWindow = open window here with the size and controls you want
<html:messages id="error">
append to the window the contents of '<bean:write name="error"
filter="false"/>'
</html:messages>



Anyone have any other ideas.

Sean

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 3:47 PM
Subject: redirect html:errors to popup window

Any suggestions on how to redirect  output to a popup window
rather than the page that the form is located on?
Thanks, Jim Canter
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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

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




RE: redirect html:errors to popup window

2002-02-09 Thread Arik Levin ( Tikal )

Put at the header javascript alert(' and close at the footer ');

U can also put a dialog window (it depends on the browser u are using ).

Hope this help.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 07, 2002 11:47 PM
To: [EMAIL PROTECTED]
Subject: redirect html:errors to popup window


Any suggestions on how to redirect  output to a popup window
rather than the page that the form is located on?
Thanks, Jim Canter

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



Re: RT expression in html:errors tag

2002-03-08 Thread Jonathan Fuerth

On Fri, Mar 08, 2002 at 06:05:42PM -0500, Jonathan Fuerth wrote:
>   

I figured it out.  I changed the above line to:



And now it works just as I wanted it to!

Does anyone know why this is?  Something to do with the way RTExpr
attributes are supposed to work in JSP?  Or maybe it's a quirk with
the way code gets generated by Jasper.

-- 
Jonathan Fuerth - SQL Power Group Inc.
(416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free)
Unleash the Power of your Corporate Data - http://www.sqlpower.ca/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




maximum number of errors in html:errors ?

2002-04-26 Thread Muthukumar Subramanian
Title: Message




Hi,Is there any limit to number of errors 
that can be used in a JSP page.,I wrote a JSP containing around 70-75 error 
properties and  a run time exception 
occured. I'm attaching a part of the 
error.
 
When I deleted some errors, the page was displayed 
partially..,
 
Is there any limit for the 
html:errors..
 
Or is the error object.finalise() is not 
called..
 
 
I tries to increase the default buffer size for 
page context from 8Kb to 20 Kb.
 
Where can be the problem . How to 
solve it?
[25/Apr/2002 16:10:27:1] error: Exception: 
SERVLET-run_failed: Failed in running template: 
/NASApp/ltc/enrollment/personalinfo.jsp, java.lang.VerifyError: 
jsp/APPS/ltc/enrollment/personalinfo._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V 
at pc 1117: stack underflow Exception Stack 
Trace:java.lang.VerifyError: 
jsp/APPS/ltc/enrollment/personalinfo._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V 
at pc 1117: stack underflow  at 
org.apache.jasper.runtime.HttpJspBase.service(Compiled Code) at 
javax.servlet.http.HttpServlet.service(Compiled Code) at 
com.netscape.server.servlet.servletrunner.ServletInfo.service(Compiled 
Code)
 
Thanks and 
Regards
Muthukumar .S
Infosys
Mysore.
 

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


RE: Override the presentation of html:errors

2001-05-01 Thread Jason Chaffee



The 
best way to handle errors is to name them separatly and then access each one 
indiviually in your jsp.  See the Java docs for more info on error 
handling.  It covers this approach quite well.

  -Original Message-From: Jeff Trent 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 1:36 
  PMTo: [EMAIL PROTECTED]Subject: Override 
  the presentation of html:errors
  Short of writing my own taglib (which I'd 
  like to avoid if I can), how does one iterate over the errors collection to 
  present them in a different way.  Any examples would be 
  helpful...
   
  Thanks,
  Jeff
   


RE: Override the presentation of html:errors

2001-05-01 Thread Graeme Miller

You have some control over the format of the font and background etc by
setting the errors.header and errors.footer properties in your
ApplicationResources.properties file

You can put html tags in these headers and footers

eg.

errors.header=
errors.footer=

where errorMessage is configured via a stylesheet

Regards,

Graeme.

-Original Message-
From: Jeff Trent [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 May 2001 8:36 a.m.
To: [EMAIL PROTECTED]
Subject: Override the presentation of html:errors


Short of writing my own taglib (which I'd like to avoid if I can), how does
one iterate over the errors collection to present them in a different way.
Any examples would be helpful...

Thanks,
Jeff



RE: Override the presentation of html:errors

2001-05-01 Thread Natra, Uday



When U 
add Ur errors to the ActionErrors Collection in the perform() method of the 
Action class, An object of type ActionErrors is saved in the request with a key 
name "ERROR_KEY". There is a method on the ActionErrors class called "get()" 
that returns a Iterator for a collection of ActionError objects. You can 
use the Struts iterator tag to display the errors in Ur own manner. Hope 
this helps.
 
Thanks,
Uday. 

  -Original Message-From: Jason Chaffee 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 5:43 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  Override the presentation of html:errors
  The 
  best way to handle errors is to name them separatly and then access each one 
  indiviually in your jsp.  See the Java docs for more info on error 
  handling.  It covers this approach quite well.
  
-Original Message-From: Jeff Trent 
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 1:36 
PMTo: [EMAIL PROTECTED]Subject: Override 
the presentation of html:errors
Short of writing my own taglib (which I'd 
like to avoid if I can), how does one iterate over the errors collection to 
present them in a different way.  Any examples would be 
helpful...
 
Thanks,
Jeff
 


Re: Override the presentation of html:errors

2001-05-02 Thread Jeff Trent



Yes, this helps.  I need to next research how 
to do that ;^)
 

  - Original Message - 
  From: 
  Natra, Uday 
  
  To: '[EMAIL PROTECTED]' 
  
  Sent: Tuesday, May 01, 2001 9:39 PM
  Subject: RE: Override the presentation of 
  html:errors
  
  When 
  U add Ur errors to the ActionErrors Collection in the perform() method of the 
  Action class, An object of type ActionErrors is saved in the request with a 
  key name "ERROR_KEY". There is a method on the ActionErrors class called 
  "get()" that returns a Iterator for a collection of ActionError objects. 
  You can use the Struts iterator tag to display the errors in Ur 
  own manner. Hope this helps.
   
  Thanks,
  Uday. 
  
-Original Message-From: Jason Chaffee 
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 5:43 
PMTo: '[EMAIL PROTECTED]'Subject: RE: 
Override the presentation of html:errors
The best way to handle errors is to name them 
separatly and then access each one indiviually in your jsp.  See the 
Java docs for more info on error handling.  It covers this approach 
quite well.

  -Original Message-From: Jeff Trent 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 1:36 
  PMTo: [EMAIL PROTECTED]Subject: 
  Override the presentation of html:errors
  Short of writing my own taglib (which 
  I'd like to avoid if I can), how does one iterate over the errors 
  collection to present them in a different way.  Any examples would be 
  helpful...
   
  Thanks,
  Jeff
   


RE: Override the presentation of html:errors

2001-05-02 Thread Firmin David

Hi Jeff,
I've done the following. It's not the prettiest, but it works (although I
haven't tested it on errors generated from the perform() method, only
validate()).
 



.html..
.html..

.html..
.html..


 
If anyone knows a prettier method, I'd be interested in it too :-)
 
Hope this helps.
Regards
David
 

-Original Message-
From: Jeff Trent [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2001 14:25
To: [EMAIL PROTECTED]
Subject: Re: Override the presentation of html:errors


Yes, this helps.  I need to next research how to do that ;^)
 

- Original Message - 
From: Natra,  <mailto:[EMAIL PROTECTED]> Uday 
To: '[EMAIL PROTECTED]'
  
Sent: Tuesday, May 01, 2001 9:39 PM
Subject: RE: Override the presentation of html:errors

When U add Ur errors to the ActionErrors Collection in the perform() method
of the Action class, An object of type ActionErrors is saved in the request
with a key name "ERROR_KEY". There is a method on the ActionErrors class
called "get()" that returns a Iterator for a collection of ActionError
objects. You can use the Struts iterator tag to display the errors in Ur own
manner. Hope this helps.
 
Thanks,
Uday. 

-Original Message-
From: Jason Chaffee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 5:43 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Override the presentation of html:errors


The best way to handle errors is to name them separatly and then access each
one indiviually in your jsp.  See the Java docs for more info on error
handling.  It covers this approach quite well.

-Original Message-
From: Jeff Trent [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 1:36 PM
To: [EMAIL PROTECTED]
Subject: Override the presentation of html:errors


Short of writing my own taglib (which I'd like to avoid if I can), how does
one iterate over the errors collection to present them in a different way.
Any examples would be helpful...
 
Thanks,
Jeff
 



The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




JavaScript with html:errors - new STRUTS validation

2001-09-30 Thread Adam Grohs
aller MVC system,
there becomes a true sense of abstraction even within that set of code.  The
JSP page itself along with the presentError method provide the true "View"
portion of the system, the throwError handler and collectError method
provide the controller for how errors are handled by the system along with
what business logic to run for a particular page(error_Login,js).  The
error_Login.js file contain the page specific validate() function that notes
what functions should be called for that page:
function validate() {
// Run page specific functions declared in .jsp file so error messages
can be stored in appResoucres.properties file
checkUserName();
checkPassword();

// Execute the collectErrors method to display any errors that are
present or submit the form
collectErrors();
}

The model portion of the system where data is received within the business
logic is encapsulated within the page specific JavaScript file that has the
JSPfile extension(error_Login.jsp).  The code within this page contains the
actual validation code for the specific fields on the page along with a
 implimentation to extrapolate error messages for a particular
case from the appResources file and populate the JavaScript validation
code(hence the JSP file type):
function checkUserName(){
if(!validateNotEmpty(document.loginForm.userName.value)){

}else{
if(!validateNumeric(document.loginForm.userName.value)){

}
if((document.loginForm.userName.value.length <
7)||(document.loginForm.userName.value.length > 25)){

}
}
}

As the page is displayed, the client side validation code is populated with
the same code snippets as were thrown earlier by the  tag:
function checkUserName(){
if(!validateNotEmpty(document.loginForm.userName.value)){
throwError("","generic","User Name");
}else{
if(!validateNumeric(document.loginForm.userName.value)){

throwError("All User Names must contain at least 1
number","specific","");
}


FLOW OF EVENTS
As the user clicks on the submit button of a form, first the error_Login.js
file gets called from its validate() function this then tells the browser to
call the checkUserName() and checkPassword() functions within the
error_Login.jsp file which has received the set of error messages from the
Application resource file as the page was displayed.  If one of the client
side functions returns an error on a field, they will call the throwError()
method within the error_Lib.js file which will created a new pageError
object and populate it with what type of error and what field had a problem
or what specific message to display.  Scripting within the error_Login.jsp
file can determine whether to keep collecting errors or return after a
crucial one is reached.  After all validation is completed in the JavaScript
tier, control is passed to the collectErrors() controller.  It will
determine if any errors have occurred and if so pass those along to the
presentErrors() handler otherwise it will submit the form to the backend for
the action class to begin its work.  If an error occurs within an action
class Validation method, it will be passed along and will eventually follow
the same mechanism thereby eliminating two code bases for error messages and
possibly dissimilar presentation of them to a user.

I think that is enough to at least intrigue some questions, I would be happy
to entertain any questions and help out with any problems.  Currently I am
working on extending the framework to include a GUI tool for configuring the
presentation of the error messages, as well a separate system for "content
management" of error messages so a business or content person can avoid
working directly with a text file.  Also I have been intrigued by the
current Validator system that many are utilizing and look forward to
encompassing some method of directly creating both sets of validation
code(front end and back end) automatically.

There are 2 very small versions of the sample attached, the one labeled
"flat files" is pure HTML w/ JavaScript to at least show the mechanism in
place without having to modify any existing STRUTS application, and the
STRUTS folder contains nearly identical code following the full path above,
but will require some configuration.

Thanks,
Adam S. Grohs
[EMAIL PROTECTED]


- Original Message -
From: "Adam Grohs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 30, 2001 2:11 PM
Subject: Re: Javascruot with html:errors


> Martin,
> That is correct, the stuts error tag cannot actually invoke a
JavaScript
> method, however it can write one out to the screen and have the browser
> throw such an error at run time of the page.  I will be posting a follow
up
> thread to explain what throwError() (the JavaScript

JavaScript with html:errors - new STRUTS validation

2001-09-30 Thread Adam Grohs
the answer, and a pure client 
side approach is inadequete.  So to mergethe two worlds together there 
needs to be one more step, and that is to havethe set of client side 
validation code, call the same set of error messagesthat the server will be 
using so as to only have to maintain one baseline.Again, by treating the 
Web Tier(front end) as its own smaller MVC system,there becomes a true sense 
of abstraction even within that set of code.  TheJSP page itself along 
with the presentError method provide the true "View"portion of the system, 
the throwError handler and collectError methodprovide the controller for how 
errors are handled by the system along withwhat business logic to run for a 
particular page(error_Login,js).  Theerror_Login.js file contain the 
page specific validate() function that noteswhat functions should be called 
for that page:function validate() {    // Run page 
specific functions declared in .jsp file so error messagescan be stored in 
appResoucres.properties file    
checkUserName();    
checkPassword();    // Execute the collectErrors method 
to display any errors that arepresent or submit the 
form    collectErrors();}The model portion of the 
system where data is received within the businesslogic is encapsulated 
within the page specific JavaScript file that has theJSPfile 
extension(error_Login.jsp).  The code within this page contains 
theactual validation code for the specific fields on the page along with 
a implimentation to extrapolate error messages for a 
particularcase from the appResources file and populate the JavaScript 
validationcode(hence the JSP file type):function 
checkUserName(){    
if(!validateNotEmpty(document.loginForm.userName.value)){    
    
}else{    
if(!validateNumeric(document.loginForm.userName.value)){    
    
}    
if((document.loginForm.userName.value.length 
<7)||(document.loginForm.userName.value.length > 
25)){    
    
}    }}As the page is displayed, the client side 
validation code is populated withthe same code snippets as were thrown 
earlier by the  tag:function 
checkUserName(){    
if(!validateNotEmpty(document.loginForm.userName.value)){    
throwError("","generic","User Name");    
}else{    
if(!validateNumeric(document.loginForm.userName.value)){    
throwError("All User Names must contain at least 
1number","specific","");    
}FLOW OF EVENTSAs the user clicks on the submit button of a 
form, first the error_Login.jsfile gets called from its validate() function 
this then tells the browser tocall the checkUserName() and checkPassword() 
functions within theerror_Login.jsp file which has received the set of error 
messages from theApplication resource file as the page was displayed.  
If one of the clientside functions returns an error on a field, they will 
call the throwError()method within the error_Lib.js file which will created 
a new pageErrorobject and populate it with what type of error and what field 
had a problemor what specific message to display.  Scripting within the 
error_Login.jspfile can determine whether to keep collecting errors or 
return after acrucial one is reached.  After all validation is 
completed in the JavaScripttier, control is passed to the collectErrors() 
controller.  It willdetermine if any errors have occurred and if so 
pass those along to thepresentErrors() handler otherwise it will submit the 
form to the backend forthe action class to begin its work.  If an error 
occurs within an actionclass Validation method, it will be passed along and 
will eventually followthe same mechanism thereby eliminating two code bases 
for error messages andpossibly dissimilar presentation of them to a 
user.I think that is enough to at least intrigue some questions, I would 
be happyto entertain any questions and help out with any problems.  
Currently I amworking on extending the framework to include a GUI tool for 
configuring thepresentation of the error messages, as well a separate system 
for "contentmanagement" of error messages so a business or content person 
can avoidworking directly with a text file.  Also I have been intrigued 
by thecurrent Validator system that many are utilizing and look forward 
toencompassing some method of directly creating both sets of 
validationcode(front end and back end) automatically.There are 2 
very small versions of the sample attached, the one labeled"flat files" is 
pure HTML w/ JavaScript to at least show the mechanism inplace without 
having to modify any existing STRUTS application, and theSTRUTS folder 
contains nearly identical code following the full path above,but will 
require some configuration.Thanks,Adam S. Grohs[EMAIL PROTECTED]- Original Message -From: "Adam Grohs" <[EMAIL PROTECTED]>To: <[EMAIL PROTECTED]>Sent: Sunday, September 30, 2001 2:11 PMSubject: Re: 
Javascruot with html

RE: html:errors tag funny null strings

2002-06-20 Thread Celestino Pena

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 Users Mailing List
Subject: html:errors tag funny null strings


Hi,

I'm using the  tag to display errors after 
the form validation fails. The problem is that when the error is 
displayed it contains a "null" string at the begining and at the end on 
the actual error message. Ex.: "null Password is required null".

What's going on ? Is this fix-able ?

Jf


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

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




Re: html:errors tag funny null strings

2002-06-20 Thread Jan Fetyko

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 : "null Password is required null".

Does that make sense ?

Jf

Celestino Pena wrote:
> 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 Users Mailing List
> Subject: html:errors tag funny null strings
> 
> 
> Hi,
> 
> I'm using the  tag to display errors after 
> the form validation fails. The problem is that when the error is 
> displayed it contains a "null" string at the begining and at the end on 
> the actual error message. Ex.: "null Password is required null".
> 
> What's going on ? Is this fix-able ?
> 
> Jf
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 



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




Re: html:errors tag funny null strings

2002-06-20 Thread Tim T. Young


Are you using Websphere?  If you are, when null String objects get written
to a jsp
they produce a "null".  Early versions of Websphere did not do this but we
had problems
starting with version 3.5.3.

I just put a errors.header= and errors.footer= in the properties file and
it takes care of it,
since I didn't have anything I wanted to display like in the example below.

Tim



   

Jan Fetyko 

 

   

06/20/2002 

02:48 PM   To: Struts Users Mailing List 
<[EMAIL PROTECTED]>  
Please respond cc: 

to "Struts 

Users Mailing  

List"  

      Subject: Re: html:errors tag funny null 
strings  
   




Caterpillar: Confidential Green  Retain Until: 07/20/2002
 Retention Category:  G90 -
 Information and Reports




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 : "null Password is required null".

Does that make sense ?

Jf

Celestino Pena wrote:
> 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 Users Mailing List
> Subject: html:errors tag funny null strings
>
>
> Hi,
>
> I'm using the  tag to display errors after
> the form validation fails. The problem is that when the error is
> displayed it contains a "null" string at the begining and at the end on
> the actual error message. Ex.: "null Password is required null".
>
> What's going on ? Is this fix-able ?
>
> Jf
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
>
>



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






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




AW: html:errors tag funny null strings

2002-06-21 Thread Kölbl Norbert

You have to add an errrors.header and an errors.footer entry to your properties file, 
wether you want to print some text before and after your errors or not. You can just 
leave them blank:

errors.header=
errors.footer=

If the entries are missing, you get a 'null' printed to your page.


Hope this helps,
Norbert


> 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 : "null Password is required null".
> 
> Does that make sense ?
> 
> Jf
> 
> Celestino Pena wrote:
> > 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 Users Mailing List
> > Subject: html:errors tag funny null strings
> > 
> > 
> > Hi,
> > 
> > I'm using the  tag to display 
> errors after 
> > the form validation fails. The problem is that when the error is 
> > displayed it contains a "null" string at the begining and 
> at the end on 
> > the actual error message. Ex.: "null Password is required null".
> > 
> > What's going on ? Is this fix-able ?
> > 
> > Jf
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> > --
> > To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 



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


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




html:errors and property and header bug

2002-06-26 Thread Boris Nieuwenhuis

Hi,
I find some strange behaviour in de  tag,
when I use a form and have two input fields and I separate the errormessages
with the property attribute in a form, like:






and the name text box, is empty so in validation I add an actionerror, but
the password is filled. so the second error tag doesn't generate a message,
the errror.header and error.footer do appear in the output  of the second
error tag, like.

"errorheader"
name is empty
"errorfooter"


"errorheader"
"errorfooter"


this doesn't seem desirable to me.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Property "errors.prefix" not used by HTML:errors ?

2002-09-30 Thread James Mitchell

What version of struts are you using?

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -Original Message-
> From: Pel Oliver Kristiansen [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 29, 2002 5:46 PM
> To: [EMAIL PROTECTED]
> Subject: Property "errors.prefix" not used by HTML:errors ?
> 
> 
> Hi all !
> 
> Complete newbe trying to get the  to print pretty.
> I include the following into my ApplicationResources.properties
> 
> errors.header=Feil oppstod!
> errors.prefix=*
> errors.sufffix=
> errors.header=
> 
> (ignore the lame tags they are just for testing)
> 
> The "errors.header" and "errors.header" are displayed but the 
> "errors.prefix" and "errors.sufffix" are not.
> 
> (HTML example output:)
> 
> Feil oppstod!
> Feltet inneholder for mye informasjon
> Feltet Navn er ikke utfyllt
> 
> 
> Any pointers ?
> 
> Pel O. Kristiansen
> 
> 
> Join 18 million Eudora users by signing up for a free Eudora 
> Web-Mail account at http://www.eudoramail.com
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

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




RE: html:errors ActionErrors accessible as scripting variable?

2002-07-15 Thread Galbreath, Mark

<%
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, 2002 4:46 PM
To: 'Struts Users Mailing List'
Subject: html:errors ActionErrors accessible as scripting variable?


I have JSP page that should determine whether there are errors or not in
order to display certain parts of the page.
So, is there a way to access the ActionErrors object in a JSP as a scripting
variable, or even better, a tag lib structure so that I can check for the
existence of the ActionErrors instance in the JSP page?

Thanks,
Henrique

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

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




RE: html:errors ActionErrors accessible as scripting variable?

2002-07-15 Thread Chang, Henrique

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?


<%
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, 2002 4:46 PM
To: 'Struts Users Mailing List'
Subject: html:errors ActionErrors accessible as scripting variable?


I have JSP page that should determine whether there are errors or not in
order to display certain parts of the page.
So, is there a way to access the ActionErrors object in a JSP as a scripting
variable, or even better, a tag lib structure so that I can check for the
existence of the ActionErrors instance in the JSP page?

Thanks,
Henrique

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

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

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




RE: html:errors ActionErrors accessible as scripting variable?

2002-07-15 Thread Ajay Chitre

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 for this so you may want to create it.


-Original Message-
From: Chang, Henrique [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 15, 2002 1:46 PM
To: 'Struts Users Mailing List'
Subject: html:errors ActionErrors accessible as scripting variable?

I have JSP page that should determine whether there are errors or not in
order to display certain parts of the page.
So, is there a way to access the ActionErrors object in a JSP as a
scripting
variable, or even better, a tag lib structure so that I can check for
the
existence of the ActionErrors instance in the JSP page?

Thanks,
Henrique

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


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




RE: html:errors ActionErrors accessible as scripting variable?

2002-07-15 Thread Martin Cooper

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 ActionErrors accessible as scripting 
> variable?
> 
> 
> <%
> 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, 2002 4:46 PM
> To: 'Struts Users Mailing List'
> Subject: html:errors ActionErrors accessible as scripting variable?
> 
> 
> I have JSP page that should determine whether there are 
> errors or not in
> order to display certain parts of the page.
> So, is there a way to access the ActionErrors object in a JSP 
> as a scripting
> variable, or even better, a tag lib structure so that I can 
> check for the
> existence of the ActionErrors instance in the JSP page?
> 
> Thanks,
> Henrique
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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




  1   2   >