RE: html:error dynamic usage

2003-06-13 Thread Mike Jasnowski
It can absolutely be done without a special tag, but in either case it's not
specific to Struts.  Although as a previous poster showed, you can use the
logic tags to enable this type of functionality, or using a combination of
tags and JavaScript you could change the DHTML class of the HTML element at
runtime based on entries in the errors collection.  IMO, wrapping fields in
custom tags for this purpose might turn into somewhat of a maintenance
headache down the road, especially if you have complex forms.

-Original Message-
From: Gregory F. March [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 11:50 AM
To: Struts Users Mailing List
Subject: Re: html:error dynamic usage



On Jun 13, 2003, "Mike Jasnowski" <[EMAIL PROTECTED]>  wrote:

 |There is no Struts facility that does what you describe. This topic has
come
 |up fairly recently on this list, and I believe one or two patches have
been
 |submitted that address this issue.  If you look through bugzilla you
should
 |be able to find them. Basically they entail a tailored version of the
 | tag for example, that detects if the field in error exists in
 |the errors collection.

It doesn't have to be done with a special tag, I would be willing to
do it programmaticly, i.e. if I could use some logic tags in
combination with a font color=red tag.

Are you saying that even this ability is not available?

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]



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



RE: html:error dynamic usage

2003-06-13 Thread Krishnakumar N
resending, as the original mail seems to have got lost

> -Original Message-
> From: Krishnakumar N 
> Sent: Friday, June 13, 2003 9:28 PM
> To: 'Struts Users Mailing List'
> Subject: RE: html:error dynamic usage
> 
> 
> you can use something like:
> 
> 
>COLSPAN="2">
> 
> 
>  COLSPAN="2">
> 
> 
> 
> 
> Cheers,
> Krishna 
> 
> > -Original Message-
> > From: Gregory F. March [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 13, 2003 9:20 PM
> > To: Struts Users Mailing List
> > Subject: Re: html:error dynamic usage
> > 
> > 
> > 
> > On Jun 13, 2003, "Mike Jasnowski" <[EMAIL PROTECTED]>  wrote:
> > 
> >  |There is no Struts facility that does what you describe. 
> > This topic has come
> >  |up fairly recently on this list, and I believe one or two 
> > patches have been
> >  |submitted that address this issue.  If you look through 
> > bugzilla you should
> >  |be able to find them. Basically they entail a tailored 
> > version of the
> >  | tag for example, that detects if the field in 
> > error exists in
> >  |the errors collection.
> > 
> > It doesn't have to be done with a special tag, I would be willing to
> > do it programmaticly, i.e. if I could use some logic tags in
> > combination with a font color=red tag.
> > 
> > Are you saying that even this ability is not available?
> > 
> > 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]
> > 
> 

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



RE: html:error dynamic usage

2003-06-13 Thread Krishnakumar N
you can use something like:





  




Cheers,
Krishna 

> -Original Message-
> From: Gregory F. March [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 13, 2003 9:20 PM
> To: Struts Users Mailing List
> Subject: Re: html:error dynamic usage
> 
> 
> 
> On Jun 13, 2003, "Mike Jasnowski" <[EMAIL PROTECTED]>  wrote:
> 
>  |There is no Struts facility that does what you describe. 
> This topic has come
>  |up fairly recently on this list, and I believe one or two 
> patches have been
>  |submitted that address this issue.  If you look through 
> bugzilla you should
>  |be able to find them. Basically they entail a tailored 
> version of the
>  | tag for example, that detects if the field in 
> error exists in
>  |the errors collection.
> 
> It doesn't have to be done with a special tag, I would be willing to
> do it programmaticly, i.e. if I could use some logic tags in
> combination with a font color=red tag.
> 
> Are you saying that even this ability is not available?
> 
> 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]
> 

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



Re: html:error dynamic usage

2003-06-13 Thread Gregory F. March

On Jun 13, 2003, "Mike Jasnowski" <[EMAIL PROTECTED]>  wrote:

 |There is no Struts facility that does what you describe. This topic has come
 |up fairly recently on this list, and I believe one or two patches have been
 |submitted that address this issue.  If you look through bugzilla you should
 |be able to find them. Basically they entail a tailored version of the
 | tag for example, that detects if the field in error exists in
 |the errors collection.

It doesn't have to be done with a special tag, I would be willing to
do it programmaticly, i.e. if I could use some logic tags in
combination with a font color=red tag.

Are you saying that even this ability is not available?

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:error dynamic usage

2003-06-13 Thread Sandeep Takhar
Someone just asked that...

I think there is a custom tag..LabelTag?

sandeep
--- "Gregory F. March" <[EMAIL PROTECTED]> wrote:
> 
> Boy, I'm just full of questions this morning!  Musta
> been something in
> my oatmeal. :-)
> 
> I would like to have a page that changes the color
> of the text
> associated with input fields when the data is
> entered incorrectly.
> For example, in the case of a "Username: _"
> textfield input, if
> the user leaves the textfield blank, I would like to
> display
> "Username:" in red.
> 
> Can I use the html:error facility or is there
> another component of
> struts that I should be looking at?
> 
> 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]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: html:error dynamic usage

2003-06-13 Thread Mike Jasnowski
There is no Struts facility that does what you describe. This topic has come
up fairly recently on this list, and I believe one or two patches have been
submitted that address this issue.  If you look through bugzilla you should
be able to find them. Basically they entail a tailored version of the
 tag for example, that detects if the field in error exists in
the errors collection.

HTH,
Mike Jasnowski

-Original Message-
From: Gregory F. March [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 8:44 AM
To: Struts Users Mailing List
Subject: html:error dynamic usage



Boy, I'm just full of questions this morning!  Musta been something in
my oatmeal. :-)

I would like to have a page that changes the color of the text
associated with input fields when the data is entered incorrectly.
For example, in the case of a "Username: _" textfield input, if
the user leaves the textfield blank, I would like to display
"Username:" in red.

Can I use the html:error facility or is there another component of
struts that I should be looking at?

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]



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



Re: html:error and tag

2003-06-11 Thread Gemes Tibor
Gregory F. March írta:

On Jun 11, 2003, "Gregory F. March" <[EMAIL PROTECTED]>  wrote:

|On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]>  wrote:
|
| |You need to reload the application in order to make the container reread 
| |the properties file.
|
|Alas...  I did that.  Twice.

Arg!  Third time's a charm.  Sorry!
 

Maybe your browser cached the result... It is the worst part of  our 
job. Hunting for nonexistent bugs.

Tib



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


Re: html:error and tag

2003-06-11 Thread Gemes Tibor
Gregory F. March írta:

On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]>  wrote:

|You need to reload the application in order to make the container reread 
|the properties file.

Alas...  I did that.  Twice.
 

http://cvs.apache.org/viewcvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ErrorsTag.java?rev=1.21&content-type=text/vnd.viewcvs-markup

Check the doStart method.

Are you using struts 1.1?

Tib



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


Re: html:error and tag

2003-06-11 Thread Gregory F. March

On Jun 11, 2003, "Gregory F. March" <[EMAIL PROTECTED]>  wrote:

 |On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]>  wrote:
 |
 | |You need to reload the application in order to make the container reread 
 | |the properties file.
 |
 |Alas...  I did that.  Twice.

Arg!  Third time's a charm.  Sorry!

/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:error and tag

2003-06-11 Thread Gregory F. March

On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]>  wrote:

 |You need to reload the application in order to make the container reread 
 |the properties file.

Alas...  I did that.  Twice.

/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:error and tag

2003-06-11 Thread Gemes Tibor
Gregory F. March írta:

On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]>  wrote:

|use errors.prefix error.posfix errors.header and errors.footer to
|configure.
|
|errors.header=
|errors.footer=
|errors.prefix=
|errors.postfix=
Ok, I'll bite.  I tried this (switching postfix to suffix) by putting
these items into my application.properties file (where my other
error.xxx properties are as well as all my application messages) and
low and behold, it was totally ignored.
Is there something other than  that one needs to do
before this will work?  See below for code and source.
 

You need to reload the application in order to make the container reread 
the properties file.

Tib



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


Re: html:error and tag

2003-06-11 Thread Gregory F. March

On Jun 11, 2003, Gemes Tibor <[EMAIL PROTECTED]>  wrote:

 |use errors.prefix error.posfix errors.header and errors.footer to
 |configure.
 |
 |errors.header=
 |errors.footer=
 |errors.prefix=
 |errors.postfix=

Ok, I'll bite.  I tried this (switching postfix to suffix) by putting
these items into my application.properties file (where my other
error.xxx properties are as well as all my application messages) and
low and behold, it was totally ignored.

Is there something other than  that one needs to do
before this will work?  See below for code and source.

Thanks,

/greg

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

--
application.properties:

errors.header=
errors.footer=
errors.prefix=
errors.suffix=

errors.required={0} is required.
errors.minlength={0} can not be less than {1} characters.
errors.maxlength={0} can not be greater than {1} characters.
errors.invalid={0} is invalid.

errors.byte={0} must be a byte.
errors.short={0} must be a short.
errors.integer={0} must be an integer.
errors.long={0} must be a long.
errors.float={0} must be a float.
errors.double={0} must be a double.

errors.date={0} is not a date.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is an invalid credit card number.
errors.email={0} is an invalid e-mail address.
...

--
index.jsp:

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>









  
  
  
  
...

--
index.jsp source:



Trade L/C





  
  

  
  
  User ID is required.
Password is required.

  
...

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



Re: html:error and tag

2003-06-11 Thread Gemes Tibor
Gemes Tibor írta:

Anurag Garg írta:

Hi,

I am facing a very simple problem . I have got ActionError in my
ActionErrors Object. Now I want to add  tag after every Action error
object in .
 

use errors.prefix error.posfix errors.header and errors.footer to
configure.
I have
errors.header=
errors.footer=
errors.prefix=
errors.postfix=
I meant suffix.

Tib



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


Re: html:error and tag

2003-06-11 Thread Gemes Tibor
Anurag Garg írta:

Hi,

I am facing a very simple problem . I have got ActionError in my
ActionErrors Object. Now I want to add  tag after every Action error
object in .
 

use errors.prefix error.posfix errors.header and errors.footer to
configure.
I have
errors.header=
errors.footer=
errors.prefix=
errors.postfix=
hth

Tib



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


RE: RE : html:error and tag

2003-06-11 Thread Anurag Garg
MessageHi ,

I got the solution. I am using errors:suffix=.
Sturts suffixes the value given in errors:suffix to every error message.
Thanks for the help by community.

Anurag Garg

 -Original Message-
From: Le Goff, Yoann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 2:29 PM
To: 'Struts Users Mailing List'
Subject: RE : html:error and  tag


  Or use  tag before message ressources ...


  -Message d'origine-
  De : O_Parthasarathy Kesavaraj [mailto:[EMAIL PROTECTED]
  Envoyé : mercredi 11 juin 2003 11:06
  À : 'Struts Users Mailing List'
  Objet : RE: html:error and  tag


  Add the  tag in your message resources after your error messages.
eg:error.user=username required

  > --
  > From: Anurag Garg[SMTP:[EMAIL PROTECTED]
  > Reply To: Struts Users Mailing List
  > Sent: Wednesday, June 11, 2003 2:24 PM
  > To:   Struts Users Mailing List
  > Subject:  html:error and  tag
  >
  > Hi,
  >
  > I am facing a very simple problem . I have got ActionError in my
  > ActionErrors Object. Now I want to add  tag after every Action
  > error object in . I am using  and not
  > specifying the individual errors property. It is displaying all the
  > errors in a single line. Any Solution.
  > Anurag Garg
  > Software Engineer
  > Nucleus Software Exports Ltd.
  > -
  > No Defeat is Final...Until You Stop Trying...
  >
  >
  > -
  > 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]


  --
-- Ce message, ainsi que tous les fichiers joints est destiné aux seules
personnes dont le nom est mentionné comme destinataire. Il peut contenir des
informations sensibles ne devant pas être divulguées et est protégé contre
toute violation par les dispositions pénales de la loi relative au secret
des correspondances. Si vous recevez ce message par erreur, nous vous
remercions de le renvoyer à son expéditeur, sans en conserver trace ou
copie, et de ne pas utiliser, reproduire, révéler, modifier ou diffuser de
manière directe ou indirecte les informations qu'il
contient ---
-



RE : html:error and tag

2003-06-11 Thread Le Goff, Yoann
Title: Message


Or use  tag before message ressources ...
-Message d'origine-De : O_Parthasarathy Kesavaraj 
[mailto:[EMAIL PROTECTED]]Envoyé 
: mercredi 11 juin 2003 11:06À : 'Struts Users Mailing List'Objet : RE: 
html:error and  tagAdd the  tag in your message 
resources after your error messages. eg:error.user=username 
required> --> From: 
    Anurag 
Garg[SMTP:[EMAIL PROTECTED]> Reply To:     
Struts Users Mailing List> Sent: 
    Wednesday, June 11, 2003 2:24 
PM> To:   Struts Users Mailing List> Subject: 
 html:error and  tag>> 
Hi,>> I am facing a very simple problem . I have got ActionError 
in my> ActionErrors Object. Now I want to add  tag after every 
Action> error object in . I am using  and not> specifying the individual errors property. It is 
displaying all the> errors in a single line. Any Solution.> Anurag 
Garg> Software Engineer> Nucleus Software Exports Ltd.> 
-> No Defeat is Final...Until 
You Stop Trying...>>> 
-> 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]

 Ce message, ainsi que tous les fichiers joints est destiné aux seules personnes dont le nom est mentionné comme destinataire. Il peut contenir des informations sensibles ne devant pas être divulguées et est protégé contre toute violation par les dispositions pénales de la loi relative au secret des correspondances. Si vous recevez ce message par erreur, nous vous remercions de le renvoyer à son expéditeur, sans en conserver trace ou copie, et de ne pas utiliser, reproduire, révéler, modifier ou diffuser de manière directe ou indirecte les informations qu'il contient   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: html:error and tag

2003-06-11 Thread O_Parthasarathy Kesavaraj
Add the  tag in your message resources after your error messages.
eg:error.user=username required

> --
> From: Anurag Garg[SMTP:[EMAIL PROTECTED]
> Reply To: Struts Users Mailing List
> Sent: Wednesday, June 11, 2003 2:24 PM
> To:   Struts Users Mailing List
> Subject:  html:error and  tag
> 
> Hi,
> 
> I am facing a very simple problem . I have got ActionError in my
> ActionErrors Object. Now I want to add  tag after every Action error
> object in .
> I am using  and not specifying the individual errors
> property. It is displaying all the errors in a single line.
> Any Solution.
> Anurag Garg
> Software Engineer
> Nucleus Software Exports Ltd.
> -
> No Defeat is Final...Until You Stop Trying...
> 
> 
> -
> 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]



RE: html:error tag

2002-06-06 Thread Galbreath, Mark

The name of the property in Application.Resources.

-Original Message-
From: Schmidt, Carl [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 6:07 PM

The docs for the property attribute of this tag state:
"Name of the property for which error messages should be displayed".
The property of what?  The bean specified by name?

Carl

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




Re: html:error tag

2002-06-06 Thread Nicolas Lapenne

There is a propertie file define in web.xml (for behind, it's
ApplicationResources.properties located in youProject/source/  )

application
ApplicationResources


where you add an error to you ActionError, you do :
errors.add("nom", new ActionError("error.modifProfil.nom.required"));

where error.modifProfil.nom.required is define in your propertie file :
error.modifProfil.nom.required=Le champ Nom ne peut être
vide

and you have to put this 2 parameters :
errors.header=Please correct this  :
errors.footer=Thanks

in jour jsp file, you will put


your text


and  will write

Please correct this  :=Le champ Nom ne peut être
videThanks
your text


It's what's you want ?

- Original Message -
From: "Schmidt, Carl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 06, 2002 12:07 AM
Subject: html:error tag


The docs for the property attribute of this tag state:
"Name of the property for which error messages should be displayed".
The property of what?  The bean specified by name?

Carl

--
To unsubscribe, e-mail:

For additional commands, e-mail:



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




Re: html:error tag

2002-06-06 Thread Nicolas De Loof

Property of the FormBean that is used by jsp tags to build HTML input
fileds.

if your JSP uses :

...


...


if validation failed on birthdate property, error will be displayed just
before this text field

Nico

> The docs for the property attribute of this tag state:
> "Name of the property for which error messages should be displayed".
> The property of what?  The bean specified by name?
>
> Carl
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



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