html:errors Tag Deprecated?

2003-12-08 Thread John Topley
I read somewhere that the html:errors tag is going to be deprecated and that
html:messages should be used instead. What's the correct syntax for using it
to display errors? Any code examples appreciated.

Thanks,

John



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



Re: html:errors Tag Deprecated?

2003-12-08 Thread Manish Singla
It is explained well here
http://jakarta.apache.org/struts/userGuide/struts-html.html#messages
HTH
Manish Singla
John Topley wrote:
I read somewhere that the html:errors tag is going to be deprecated and that
html:messages should be used instead. What's the correct syntax for using it
to display errors? Any code examples appreciated.
Thanks,

John



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


--
Thanks
Manish Singla
x73166
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


html:errors tag..

2003-09-15 Thread Ritvik
Hi There,

I am using html:errors\ 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]



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 html:errors\ 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 html:errors\ 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]



Re: html:errors/ tag

2003-07-31 Thread Andrew Geery
Look at the logic:messagesPresent tag. From the description of the 
messagesPresent tag 
(http://jakarta.apache.org/struts/userGuide/struts-logic.html#messagesPresent):
Evaluates the nested body content of this tag if an |ActionMessages| 
object, |ActionErrors| object, a String, or a String array is in request 
scope. If such a bean is not found, nothing will be rendered.

You could also modify your message resource properties to display your 
errors in a table and let Struts do all of the work for you. From the 
description of the html:errors tag 
(http://jakarta.apache.org/struts/userGuide/struts-html.html#errors):

In order to use this tag successfully, you must have defined an 
application scope |MessageResources| bean under the default attribute 
name, with optional definitions of the following message keys:

   * *errors.header* - Text that will be rendered before the error
 messages list. Typically, this message text will end with |ul|
 to start the error messages list.
   * *errors.footer* - Text that will be rendered after the error
 messages list. Typically, this message text will begin with
 |/ul| to end the error messages list.
   * *errors.prefix* - Text that will be rendered before each
 individual error in the list.
   * *errors.suffix* - Text that will be rendered after each individual
 error in the list.
Silverio Wagner Silva(Secorp) wrote:

People,

I´d like to put the errors from html:errors/ in a personalized table in my
jsp. But the code depends on existing any errors to show the table or not.
The question is how can I evaluate if the tag html:erros/ will return
something.
Thanks in advance,

-Mensagem original-
De: Vic Cekvencih [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 31 de julho de 2003 08:45
Para: [EMAIL PROTECTED]
Assunto: Re: Survey Builder

Fixed bid development:
http://basebeans.com/do/cmsPg?content=DEVELOPMENT
Most likely it is a few screens. (Ex: Create Survey, Take a survey)
.V
Prashanth.S wrote:
 

how much do u charge for that kind of an application..

PREETAM Balijepalli [EMAIL PROTECTED] wrote:
Do u need it for money or free
-Original Message-
From: Marco Fabbri [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 3:02 PM
To: Struts Users Mailing List
Subject: Survey Builder
Hi all,
does someone knows how can I find a struts application to dynamically
   

build a survey?
 

An example is : http://www.surveytime.com/.

But I need less features than this...
Thanks a lot in advance.
Marco Fabbri

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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
   



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



html:errors / tag causing 500 error under OC4J

2003-06-20 Thread frankgriffithiii
When I use the html:errors / tag under OC4J, I get a 500 error. All 
other html tags work fine. Has anyone had this type of problem before?

Thanks


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



RE: html:errors / tag causing 500 error under OC4J

2003-06-20 Thread Frank Griffith
Nothing in any of the logs. I'm using the standard struts-html.tld. 

Karr, David [EMAIL PROTECTED] wrote:If you're getting a 500 error, that means your 
server had an error.
Check the server log to see what broke.

You aren't by any chance mapping html to the html-el tag library,
are you?

 -Original Message-
 From: frankgriffithiii [mailto:[EMAIL PROTECTED]
 
 When I use the tag under OC4J, I get a 500 error. All
 other html tags work fine. Has anyone had this type of problem before?
 
 Thanks

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



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: html:errors / tag in javascript alert

2003-06-13 Thread Martin Fekete
try this ...

errors.header   =alert(
errors.prefix  =
errors.suffix  =+ \\n +
errors.footer   =);\n

...
script
function load() {
html:errors /
}

/script
...
body onLoad=load
...

it should work but it won't because of
http://issues.apache.org/bugzilla/show_bug.cgi?id=17418
so you need to hack org.apache.struts.taglib.html.ErrorsTag

Feky

- Original Message - 
From: Anurag Garg [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, June 13, 2003 7:27 AM
Subject: html:errors / tag in javascript alert


 Hi,

 I want to display the validation error message from ActionForm in
javascript
 alert box, ragther than displaying on my jsp page.
 I am doing it in a javascript function at page load time like this,

 alert(html:errors /)

 But i am getting the java script error saying Object expected. Any
 solution for this problem..

 Thanks,
 Anurag Garg


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




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



html:errors / tag in javascript alert

2003-06-12 Thread Anurag Garg
Hi,

I want to display the validation error message from ActionForm in javascript
alert box, ragther than displaying on my jsp page.
I am doing it in a javascript function at page load time like this,

alert(html:errors /)

But i am getting the java script error saying Object expected. Any
solution for this problem..

Thanks,
Anurag Garg


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

pre
html:errors/
/pre

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

pre
html:errors/
/pre

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]


How to pass paramaeters to display dynamic text using html:errors tag?

2002-07-30 Thread Ravi Kora

Hi,
I am a newbie to struts. Right now, I am able to display server side
errors using the html:errors tag. But, I want to extend the
functionality of this to display some dynamic text. 
I want to pass a parameter to the tag in Application.properties file
which adds the parameter to the text dynamically and adds the object to
ActionErrors class. I know this feature is supported in struts but I am
not able to find any source about this. Can someone help me with this?


Thanks  Regards,
Ravi Kora
337-739-3434(M) 


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




html:errors tag behaves strangely.

2002-07-29 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

html:errors property=Login/ up the top (Login populated by my 
LoginAction) and then

inline in my form html:errors property=username/ 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

html:errors

html:error property=.../

...

my form

html:error property=.../

/html:errors

would seem to make the most sense to me.

i saw a cryptic reference to using html:message ... 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:   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
 
 html:errors property=password/
 
 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=h3font color=redValidation 
 Error/font/h3You must
  correct the following error(s) before proceeding:ul
  errors.footer=/ulhr
  
  
  -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 html:errors property=.../ 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]




Re: html:errors tag funny null strings -SOLVED

2002-06-21 Thread Jan Fetyko

I'm not using Websphere, but Tomcat, however putting those entries into 
my properties file HELPED !

THANK YOU.

Jf

Tim T. Young wrote:
 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   
  
 janof@phase2o   
  
 nline.com   
  
  
  
 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
 
 html:errors property=password/
 
 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=h3font color=redValidation Error/font/h3You must
correct the following error(s) before proceeding:ul
errors.footer=/ulhr


-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 html:errors property=.../ 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]
 
 



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




html:errors tag funny null strings

2002-06-20 Thread Jan Fetyko

Hi,

I'm using the html:errors property=.../ 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]




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=h3font color=redValidation Error/font/h3You must
correct the following error(s) before proceeding:ul
errors.footer=/ulhr


-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 html:errors property=.../ 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

html:errors property=password/

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=h3font color=redValidation Error/font/h3You must
 correct the following error(s) before proceeding:ul
 errors.footer=/ulhr
 
 
 -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 html:errors property=.../ 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 

janof@phase2o 

nline.com 

   

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

html:errors property=password/

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=h3font color=redValidation Error/font/h3You must
 correct the following error(s) before proceeding:ul
 errors.footer=/ulhr


 -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 html:errors property=.../ 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]




How to use html:errors / tag

2002-04-14 Thread bluetooth

Hi all...I'm trying to use a html:errrors/ tag to display errors in my jsp page. I 
have defined an action error variable and saved the error in my Action class as appear 
in the following:

if (!errors.empty()) {
saveErrors(req, errors);
String error=mapping.findForward 
   (deleteError).getPath();

   return new ActionForward(error);
} 

However, do I need to request for the errors in my jsp in order to display it? Or is 
it that struts is so flexible that it will automatically detect and display the errors 
by itself on the page?

Any help would be appreciated.

regards :)


See Dave Matthews Band live or win a signed guitar
http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp
 

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




RT expression in html:errors tag

2002-03-08 Thread Jonathan Fuerth

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

logic:iterate collection=foobar id=foo indexId=i
  html:text name=foo property=myValue indexed=true/
  html:errors property=foo%= i %/
/logic:iterate

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
html:errors/ 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:   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:
   html:errors property=foo%= i %/

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

html:errors property='%= foo+i %'/

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




RE: Problem with html:errors tag

2001-11-30 Thread Jon.Ridgway

Hi,

Are you getting any errors/stack traces from your web container? 

Jon.

-Original Message-
From: BinhMinh Nguyen [mailto:[EMAIL PROTECTED]] 
Sent: 30 November 2001 00:36
To: Struts Users Mailing List
Subject: Problem with html:errors tag

For some reasons, this html:errors is no longer
working for me :( can some one help me out?

In the web.xml, I  added this

!--the application resources --
init-param
   param-nameapplication/param-name
   param-valueApplicationResources/param-value
/init-param


In the struts-config.xml, I  added this:

action-mappings
!-- Retailer-Main --
action path=/forgetpassword
   
type=com.fnet.struts.login.ForgetPasswordAction
name=forgetPasswordForm 
input=/login.jsp
scope=request
validate=true

/action

  /action-mappings   

in the ACtionForm bean my validate method work fine:

 public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
   {
 
FNPrinter.toScreen(ForgetPasswordForm-validate():
validating User-info ...);
  ActionErrors errors = new ActionErrors();
  
  
  if ((userId == null) || (userId.length()  1))
  {

FNPrinter.toScreen(ForgetPasswordForm-invalid
UserId:  + userId);
 errors.add(errInvalidUserId, new
ActionError(error.login.forgetpw.userid.invalid));
  }

  if ((userEmail == null) || (userEmail.length() 
1))
  {

FNPrinter.toScreen(ForgetPasswordForm-invalid
UserEmail:  + userEmail);
 errors.add(errInvalidUserEmail, new
ActionError(error.login.forgetpw.useremail.invalid));
  }
  
  FNPrinter.toScreen(Error-Log:  +
errors.size());
  
  return errors;
   }


and the jsp page , I tried to display the error like
this:
tr
td colspan=1nbsp;/td
td align=leftUser_Name:nbsp;nbsp;/td
td align=left colspan=1
html:text property=userId size=20 /
nbsp;nbsp;
html:errors property=errInvalidUserId /
/td
/tr


my Application resources also has the property for
this key...

it still does not work for me, 

CAn someone help me on this.
thanks

Binh


__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
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: Problem with html:errors tag - still not working

2001-11-29 Thread BinhMinh Nguyen

Ted,
thanks for reply, I did what you suggested, but it
still does not work, I also double check the tld
import statement. Do you have any idea why?
thanks

Binh


--- Ted Husted [EMAIL PROTECTED] wrote:
 Double check that the taglib is imported at the top
 of the JSP. 
 
 You can also set 
 
 init-param
param-namenull/param-name
param-valuefalse/param-value
 /init-param
 
 in the web.xml so that it will report any missing
 message keys.
 
 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/
 
 
 BinhMinh Nguyen wrote:
  
  For some reasons, this html:errors is no longer
  working for me :( can some one help me out?
  
  In the web.xml, I  added this
  
  !--the application resources --
  init-param
 param-nameapplication/param-name

 param-valueApplicationResources/param-value
  /init-param
  
  In the struts-config.xml, I  added this:
  
  action-mappings
  !-- Retailer-Main --
  action path=/forgetpassword
  
  type=com.fnet.struts.login.ForgetPasswordAction
  name=forgetPasswordForm
  input=/login.jsp
  scope=request
  validate=true
  
  /action
  
/action-mappings
  
  in the ACtionForm bean my validate method work
 fine:
  
   public ActionErrors validate(ActionMapping
 mapping,
  HttpServletRequest request)
 {
  
 
 FNPrinter.toScreen(ForgetPasswordForm-validate():
  validating User-info ...);
ActionErrors errors = new ActionErrors();
  
  
if ((userId == null) || (userId.length() 
 1))
{
  
  FNPrinter.toScreen(ForgetPasswordForm-invalid
  UserId:  + userId);
   errors.add(errInvalidUserId, new
 
 ActionError(error.login.forgetpw.userid.invalid));
}
  
if ((userEmail == null) ||
 (userEmail.length() 
  1))
{
  
  FNPrinter.toScreen(ForgetPasswordForm-invalid
  UserEmail:  + userEmail);
   errors.add(errInvalidUserEmail, new
 

ActionError(error.login.forgetpw.useremail.invalid));
}
  
FNPrinter.toScreen(Error-Log:  +
  errors.size());
  
return errors;
 }
  
  and the jsp page , I tried to display the error
 like
  this:
  tr
  td colspan=1nbsp;/td
  td align=leftUser_Name:nbsp;nbsp;/td
  td align=left colspan=1
  html:text property=userId size=20 /
  nbsp;nbsp;
  html:errors property=errInvalidUserId
 /
  /td
  /tr
  
  my Application resources also has the property for
  this key...
  
  it still does not work for me,
  
  CAn someone help me on this.
  thanks
  
  Binh
  
  __
  Do You Yahoo!?
  Yahoo! GeoCities - quick and easy web site
 hosting, just $8.95/month.
  http://geocities.yahoo.com/ps/info1
  
  --
  To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 u can also set 
 
 init-param
param-namenull/param-name
param-valuefalse/param-value
 /init-param
 
 in the web.xml, so it will report any missing
 messages. 
 
 BinhMinh Nguyen wrote:
  
  For some reasons, this html:errors is no longer
  working for me :( can some one help me out?
  
  In the web.xml, I  added this
  
  !--the application resources --
  init-param
 param-nameapplication/param-name

 param-valueApplicationResources/param-value
  /init-param
  
  In the struts-config.xml, I  added this:
  
  action-mappings
  !-- Retailer-Main --
  action path=/forgetpassword
  
  type=com.fnet.struts.login.ForgetPasswordAction
  name=forgetPasswordForm
  input=/login.jsp
  scope=request
  validate=true
  
  /action
  
/action-mappings
  
  in the ACtionForm bean my validate method work
 fine:
  
   public ActionErrors validate(ActionMapping
 mapping,
  HttpServletRequest request)
 {
  
 
 FNPrinter.toScreen(ForgetPasswordForm-validate():
  validating User-info ...);
ActionErrors errors = new ActionErrors();
  
  
if ((userId == null) || (userId.length() 
 1))
{
  
  FNPrinter.toScreen(ForgetPasswordForm-invalid
  UserId:  + userId);
   errors.add(errInvalidUserId, new
 
 ActionError(error.login.forgetpw.userid.invalid));
}
  
if ((userEmail == null) ||
 (userEmail.length() 
  1))
{
  
  FNPrinter.toScreen(ForgetPasswordForm-invalid
  UserEmail:  + userEmail);
   errors.add(errInvalidUserEmail, new
 

ActionError(error.login.forgetpw.useremail.invalid));
 
=== message truncated ===


__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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




RE: Problem with html:errors tag - still not working

2001-11-29 Thread Miroslav Stojanovic



 -Original Message-
 From: BinhMinh Nguyen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 29, 2001 5:42 PM
 To: Struts Users Mailing List
 Subject: Re: Problem with html:errors tag - still not working
 
 
 Ted,
 thanks for reply, I did what you suggested, but it
 still does not work, I also double check the tld
 import statement. Do you have any idea why?
 thanks
 
 Binh
 
 
 --- Ted Husted [EMAIL PROTECTED] wrote:
  Double check that the taglib is imported at the top
  of the JSP. 
  
  You can also set 
  
  init-param
 param-namenull/param-name
 param-valuefalse/param-value
  /init-param
  
  in the web.xml so that it will report any missing
  message keys.
  
  -- Ted Husted, Husted dot Com, Fairport NY USA.
  -- Custom Software ~ Technical Services.
  -- Tel +1 716 737-3463
  -- http://www.husted.com/struts/
  
  
  BinhMinh Nguyen wrote:
   
   For some reasons, this html:errors is no longer
   working for me :( can some one help me out?
   
   In the web.xml, I  added this
   
   !--the application resources --
   init-param
  param-nameapplication/param-name
 
  param-valueApplicationResources/param-value
   /init-param
   
   In the struts-config.xml, I  added this:
   
   action-mappings
   !-- Retailer-Main --
   action path=/forgetpassword
   
   type=com.fnet.struts.login.ForgetPasswordAction
   name=forgetPasswordForm
   input=/login.jsp
   scope=request
   validate=true
   
   /action
   
 /action-mappings
   
   in the ACtionForm bean my validate method work
  fine:
   
public ActionErrors validate(ActionMapping
  mapping,
   HttpServletRequest request)
  {
   
  
  FNPrinter.toScreen(ForgetPasswordForm-validate():
   validating User-info ...);
 ActionErrors errors = new ActionErrors();
   
   
 if ((userId == null) || (userId.length() 
  1))
 {
   
   FNPrinter.toScreen(ForgetPasswordForm-invalid
   UserId:  + userId);
errors.add(errInvalidUserId, new
  
  ActionError(error.login.forgetpw.userid.invalid));
 }
   
 if ((userEmail == null) ||
  (userEmail.length() 
   1))
 {
   
   FNPrinter.toScreen(ForgetPasswordForm-invalid
   UserEmail:  + userEmail);
errors.add(errInvalidUserEmail, new
  
 
 ActionError(error.login.forgetpw.useremail.invalid));
 }
   
 FNPrinter.toScreen(Error-Log:  +
   errors.size());
   
 return errors;
  }
   
   and the jsp page , I tried to display the error
  like
   this:
   tr
   td colspan=1nbsp;/td
   td align=leftUser_Name:nbsp;nbsp;/td
   td align=left colspan=1
   html:text property=userId size=20 /
   nbsp;nbsp;
   html:errors property=errInvalidUserId
  /
   /td
   /tr
   
   my Application resources also has the property for
   this key...
   
   it still does not work for me,
   
   CAn someone help me on this.
   thanks
   
   Binh
   
   __
   Do You Yahoo!?
   Yahoo! GeoCities - quick and easy web site
  hosting, just $8.95/month.
   http://geocities.yahoo.com/ps/info1
   
   --
   To unsubscribe, e-mail:  
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  u can also set 
  
  init-param
 param-namenull/param-name
 param-valuefalse/param-value
  /init-param
  
  in the web.xml, so it will report any missing
  messages. 
  
  BinhMinh Nguyen wrote:
   
   For some reasons, this html:errors is no longer
   working for me :( can some one help me out?
   
   In the web.xml, I  added this
   
   !--the application resources --
   init-param
  param-nameapplication/param-name
 
  param-valueApplicationResources/param-value
   /init-param
   
   In the struts-config.xml, I  added this:
   
   action-mappings
   !-- Retailer-Main --
   action path=/forgetpassword
   
   type=com.fnet.struts.login.ForgetPasswordAction
   name=forgetPasswordForm
   input=/login.jsp
   scope=request
   validate=true
   
   /action
   
 /action-mappings
   
   in the ACtionForm bean my validate method work
  fine:
   
public ActionErrors validate(ActionMapping
  mapping,
   HttpServletRequest request)
  {
   
  
  FNPrinter.toScreen(ForgetPasswordForm-validate():
   validating User-info ...);
 ActionErrors errors = new ActionErrors();
   
   
 if ((userId == null) || (userId.length() 
  1))
 {
   
   FNPrinter.toScreen(ForgetPasswordForm-invalid
   UserId:  + userId);
errors.add(errInvalidUserId, new
  
  ActionError(error.login.forgetpw.userid.invalid));
 }
   
 if ((userEmail == null) ||
  (userEmail.length() 
   1))
 {
   
   FNPrinter.toScreen(ForgetPasswordForm-invalid
   UserEmail:  + userEmail);
errors.add

problem with html:errors tag

2001-10-23 Thread Scriven, Marcos

When I get errors with my form validation, I cannot seem to place them where
I want them.

I have tried html:errors / and html:errors property=firstName/

1) In both cases (and even when there is no errors tag at all), I get all of
the errors at the top of my page... any ideas why?

2) Once I get errors, I then have a page with no javascript on it - in which
case the user can then just type garbage, which I want to check on the
client side. How do I get around this one?

I've seen posts that use the errors.header/footer to include some clever
javascript - is this the only way?

Thanks

Marcos



Re: problem with html:errors tag

2001-10-23 Thread Rob Breeds

1. You need to put the html:errors property=whatever/ where you want
them to appear. If you have several input fields, put a html:errors
property=whatever/ next to each input field.

The header and footer are for formatting but they are optional.

Rob Breeds





   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: problem with html:errors tag   
   
   
   
23/10/2001 
   
11:48  
   
Please respond 
   
to struts-user 
   
   
   
   
   




When I get errors with my form validation, I cannot seem to place them
where
I want them.

I have tried html:errors / and html:errors property=firstName/

1) In both cases (and even when there is no errors tag at all), I get all
of
the errors at the top of my page... any ideas why?

2) Once I get errors, I then have a page with no javascript on it - in
which
case the user can then just type garbage, which I want to check on the
client side. How do I get around this one?

I've seen posts that use the errors.header/footer to include some clever
javascript - is this the only way?

Thanks

Marcos






RE: problem with html:errors tag

2001-10-23 Thread Scriven, Marcos

Thanks - but that's exactly what I did!

I have two text boxes, firstName and lastName

I triple checked the property names and capitalisation, and I still get all
the errors.

Also, I would have thought that not including any error tag would mean no
errors would be displayed.

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:07
 To: [EMAIL PROTECTED]
 Subject: Re: problem with html:errors tag
 
 
 1. You need to put the html:errors property=whatever/ 
 where you want
 them to appear. If you have several input fields, put a html:errors
 property=whatever/ next to each input field.
 
 The header and footer are for formatting but they are optional.
 
 Rob Breeds
 
 
 
 
 
   
   
   
 Scriven, 
   
   
 Marcos  To: 
 '[EMAIL PROTECTED]' 
 [EMAIL PROTECTED]  
 Marcos.Scrive   cc:  
   
   
 [EMAIL PROTECTED]Subject: problem 
 with html:errors tag
   
   
   
   
 23/10/2001
   
   
 11:48 
   
   
 Please respond
   
   
 to struts-user
   
   
   
   
   
   
   
   
 
 
 
 
 When I get errors with my form validation, I cannot seem to place them
 where
 I want them.
 
 I have tried html:errors / and html:errors property=firstName/
 
 1) In both cases (and even when there is no errors tag at 
 all), I get all
 of
 the errors at the top of my page... any ideas why?
 
 2) Once I get errors, I then have a page with no javascript on it - in
 which
 case the user can then just type garbage, which I want to check on the
 client side. How do I get around this one?
 
 I've seen posts that use the errors.header/footer to include 
 some clever
 javascript - is this the only way?
 
 Thanks
 
 Marcos
 
 
 



RE: problem with html:errors tag

2001-10-23 Thread Rob Breeds

you still get error messages even without the html:errors/ tag? Sounds
like a restart web app required?

in the ActionForm validation() method, how do you populate Errors?

Rob





   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: RE: problem with html:errors 
tag  
   
   
23/10/2001 
   
12:18  
   
Please respond 
   
to struts-user 
   
   
   
   
   




Thanks - but that's exactly what I did!

I have two text boxes, firstName and lastName

I triple checked the property names and capitalisation, and I still get all
the errors.

Also, I would have thought that not including any error tag would mean no
errors would be displayed.

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:07
 To: [EMAIL PROTECTED]
 Subject: Re: problem with html:errors tag


 1. You need to put the html:errors property=whatever/
 where you want
 them to appear. If you have several input fields, put a html:errors
 property=whatever/ next to each input field.

 The header and footer are for formatting but they are optional.

 Rob Breeds








 Scriven,


 Marcos  To:
 '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 Marcos.Scrive   cc:


 [EMAIL PROTECTED]Subject: problem
 with html:errors tag




 23/10/2001


 11:48


 Please respond


 to struts-user












 When I get errors with my form validation, I cannot seem to place them
 where
 I want them.

 I have tried html:errors / and html:errors property=firstName/

 1) In both cases (and even when there is no errors tag at
 all), I get all
 of
 the errors at the top of my page... any ideas why?

 2) Once I get errors, I then have a page with no javascript on it - in
 which
 case the user can then just type garbage, which I want to check on the
 client side. How do I get around this one?

 I've seen posts that use the errors.header/footer to include
 some clever
 javascript - is this the only way?

 Thanks

 Marcos









RE: problem with html:errors tag

2001-10-23 Thread Scriven, Marcos

Hi Rob

Here is my validate method (from the ActionForm bean):

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
log.debug(Validating form);
ActionErrors errors = new ActionErrors();
if ((_firstName == null) || (_firstName.length()  1)) {
errors.add(firstName, new
ActionError(error.firstname.required));
}
if ((_lastName == null) || (_lastName.length()  1)) {
errors.add(lastName, new
ActionError(error.lastname.required));
}

return errors;
}

The problem occurs regardless of whether or not I restart the web server.
Here is my entire JSP:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

script src=date.js/script
script src=strings.js/script
script src=validation.js/script

html:html locale=true
head
titleAdd Sales Person/title
html:base/
link rel=stylesheet href=/stylesheets/gs1.css type=text/css
/head
body bgcolor=#003399 text=#FF



html:form action=/sourcefiles/dealinfo/addSalesPerson focus=firstName

table border=0 width=100%

  tr
td align=right class=text8lilac
First Name
/td
td align=left
html:text styleClass=form2 property=firstName size=16
maxlength=16 onBlur=javascript:validateName(this);/
html:errors property=firstName/

/td
  /tr

  tr
td align=right class=text8lilac
  Last Name
/td
td align=left
  html:text styleClass=form2 property=lastName size=16
maxlength=16 onBlur=javascript:validateName(this);/
  html:errors property=lastName/
/td
  /tr

  tr
td align=right
  html:submit styleClass=form1 property=submit value=Submit/
/td
td align=left
  html:reset styleClass=form1/
/td
  /tr

/table

/html:form
/body
/html:html

Any help gratefully received!

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:46
 To: [EMAIL PROTECTED]
 Subject: RE: problem with html:errors tag
 
 
 you still get error messages even without the html:errors/ 
 tag? Sounds
 like a restart web app required?
 
 in the ActionForm validation() method, how do you populate Errors?
 
 Rob
 
 
 
 
 
   
   
   
 Scriven, 
   
   
 Marcos  To: 
 '[EMAIL PROTECTED]' 
 [EMAIL PROTECTED]  
 Marcos.Scrive   cc:  
   
   
 [EMAIL PROTECTED]Subject: RE: 
 problem with html:errors tag
   
   
   
   
 23/10/2001
   
   
 12:18 
   
   
 Please respond
   
   
 to struts-user
   
   
   
   
   
   
   
   
 
 
 
 
 Thanks - but that's exactly what I did!
 
 I have two text boxes, firstName and lastName
 
 I triple checked the property names and capitalisation, and I 
 still get all
 the errors.
 
 Also, I would have thought that not including any error tag 
 would mean no
 errors would be displayed.
 
 Marcos
 
  -Original Message-
  From: Rob Breeds [mailto:[EMAIL PROTECTED]]
  Sent: 23 October 2001 12:07
  To: [EMAIL PROTECTED]
  Subject: Re: problem with html:errors tag
 
 
  1. You need to put the html:errors property=whatever/
  where you want
  them to appear. If you have several input fields, put a html:errors
  property=whatever/ next to each input field.
 
  The header and footer are for formatting but they are optional.
 
  Rob Breeds
 
 
 
 
 
 
 
 
  Scriven,
 
 
  Marcos  To:
  '[EMAIL PROTECTED]'
  [EMAIL PROTECTED

RE: problem with html:errors tag

2001-10-23 Thread Rob Breeds


looks OK to me. Do the variables _firstName and _lastName get populated by
setFirstName() and setLastName()?

Other than that I'm afraid I've no idea - I'm still writing my first struts
app!

Rob


   
   
Scriven,  
   
Marcos  To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]  
Marcos.Scrive   cc:   
   
[EMAIL PROTECTED]Subject: RE: problem with html:errors 
tag  
   
   
23/10/2001 
   
13:26  
   
Please respond 
   
to struts-user 
   
   
   
   
   




Hi Rob

Here is my validate method (from the ActionForm bean):

public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
log.debug(Validating form);
ActionErrors errors = new ActionErrors();
if ((_firstName == null) || (_firstName.length()  1)) {
errors.add(firstName, new
ActionError(error.firstname.required));
}
if ((_lastName == null) || (_lastName.length()  1)) {
errors.add(lastName, new
ActionError(error.lastname.required));
}

return errors;
}

The problem occurs regardless of whether or not I restart the web server.
Here is my entire JSP:

%@ page language=java %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

script src=date.js/script
script src=strings.js/script
script src=validation.js/script

html:html locale=true
head
titleAdd Sales Person/title
html:base/
link rel=stylesheet href=/stylesheets/gs1.css type=text/css
/head
body bgcolor=#003399 text=#FF



html:form action=/sourcefiles/dealinfo/addSalesPerson focus=firstName

table border=0 width=100%

  tr
td align=right class=text8lilac
First Name
/td
td align=left
html:text styleClass=form2 property=firstName size=16
maxlength=16 onBlur=javascript:validateName(this);/
html:errors property=firstName/

/td
  /tr

  tr
td align=right class=text8lilac
  Last Name
/td
td align=left
  html:text styleClass=form2 property=lastName size=16
maxlength=16 onBlur=javascript:validateName(this);/
  html:errors property=lastName/
/td
  /tr

  tr
td align=right
  html:submit styleClass=form1 property=submit value=Submit/
/td
td align=left
  html:reset styleClass=form1/
/td
  /tr

/table

/html:form
/body
/html:html

Any help gratefully received!

Marcos

 -Original Message-
 From: Rob Breeds [mailto:[EMAIL PROTECTED]]
 Sent: 23 October 2001 12:46
 To: [EMAIL PROTECTED]
 Subject: RE: problem with html:errors tag


 you still get error messages even without the html:errors/
 tag? Sounds
 like a restart web app required?

 in the ActionForm validation() method, how do you populate Errors?

 Rob








 Scriven,


 Marcos  To:
 '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 Marcos.Scrive   cc:


 [EMAIL PROTECTED]Subject: RE:
 problem with html:errors tag




 23/10/2001


 12:18


 Please respond


 to struts-user












 Thanks - but that's exactly what I did!

 I have two text boxes, firstName and lastName

 I triple checked the property names and capitalisation, and I
 still get all
 the errors.

 Also, I would have thought that not including any error tag
 would mean no
 errors would be displayed.

 Marcos

  -Original Message-
  From: Rob Breeds [mailto:[EMAIL PROTECTED]]
  Sent

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




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.

  logic:present name=%=
org.apache.struts.action.Action.ERROR_KEY %
scope=request
red label1
  /logic:present
  logic:notPresent name=%=
org.apache.struts.action.Action.ERROR_KEY %
scope=request
blue lable2
  /logic:notPresent

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.

html:errors property=name/

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.

validator:errorsExist property=name
   red label
/validator:errorsExist

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/



html:errors tag

2001-04-28 Thread jsmith

I am trying to figure out how the html:errors are ordered when they 
are redisplayed and if there is a way to control it.  I have a page that 
can have several errors and I would like to control the order they are 
displayed but I can't figure out how to do this.

Thanks,

--
Jason Smith
[EMAIL PROTECTED]




Getting the html:errors tag to display on multiple lines

2001-03-13 Thread Justin Forys

Hello,

I guess this is kind of a trivial question, but I'm having a problem getting
the
"html:errors" tag to display on multiple lines for multiple errors. Am I
overlooking
something obvious, or do I have to use the iterator tag and parse the errors
myself if
I want them on separate lines? If you could respond directly to me at: 

[EMAIL PROTECTED]

Thanks
Justin

 winmail.dat


Re: Getting the html:errors tag to display on multiple lines

2001-03-13 Thread Michael McCallister

Just specify the property attribute of the html:errors tag.  So, for 
example, in your validate function you might have something like:

 errors.add("roles", new 
ActionError("error.reqaccess.role.invalid"));

to indicate an error in the "roles" field.  Using:

 html:errors property="roles"/

in your JSP will show only the errors associated with the roles 
field.  Repeat this for as many fields as you have and use the appropriate 
parameters to errors.add(), and you should be able to place errors in the 
appropriate locations.


Mike

At 02:12 PM 3/13/2001, you wrote:
Hello,

I guess this is kind of a trivial question, but I'm having a problem getting
the
"html:errors" tag to display on multiple lines for multiple errors. Am I
overlooking
something obvious, or do I have to use the iterator tag and parse the errors
myself if
I want them on separate lines? If you could respond directly to me at:

[EMAIL PROTECTED]

Thanks
Justin




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 html:errors property="foo"/ seems to be exactly 
 the same as doing
 html:errors/ 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 html:errors property="foo"/ seems to be exactly
 the same as doing
 html:errors/ 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.