You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stefano Tranquillini <st...@gmail.com> on 2009/04/17 20:22:57 UTC
Display action errors above the field
Hi all
i'm starting with struts2, there's a possibilty to display the errors comes
from actionerros over the corrisponding field?
eg:
i've 3 fields:
- name
- surname
- email
the email si not valid, i want:
- name
- surname
* your email is not valid *
- email
if i put <s:actionerrors /> i see this thing:
* your email is not valid *
- name
- surname
- email
thanks.
--
Stefano
Re: Display action errors above the field
Posted by Stefano Tranquillini <st...@gmail.com>.
i found and modified!
thanks
On Sat, Apr 18, 2009 at 15:16, Dave Newton <ne...@yahoo.com> wrote:
> Stefano Tranquillini wrote:
>>
>> How can i change how struts display the errorrs?
>>
>> can i set that display in a red rectangle or something like this?
>>
>> i ought modify or add somethings in css, right? but what?
>
> Look at the emitted CSS and the stylesheet included by Struts.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Display action errors above the field
Posted by Dave Newton <ne...@yahoo.com>.
Stefano Tranquillini wrote:
> How can i change how struts display the errorrs?
>
> can i set that display in a red rectangle or something like this?
>
> i ought modify or add somethings in css, right? but what?
Look at the emitted CSS and the stylesheet included by Struts.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Display action errors above the field
Posted by Stefano Tranquillini <st...@gmail.com>.
How can i change how struts display the errorrs?
can i set that display in a red rectangle or something like this?
i ought modify or add somethings in css, right? but what?
On Fri, Apr 17, 2009 at 21:17, Security Management <
list-subscriptions@secmgmt.com> wrote:
> Extend ActionSupport in your actions.
>
>
>
> -----Original Message-----
> From: Stefano Tranquillini [mailto:stefano.tranquillini@gmail.com]
> Sent: Friday, April 17, 2009 2:40 PM
> To: Struts Users Mailing List
> Subject: Re: Display action errors above the field
>
> a k.
>
> tomorrow i'll try.
>
> i've used only addFieldError("errors");
>
> other things,i'll try to use getText in order to keep the text from the
> proprieties but the getText method doesn't found.
>
> i've to use some library?
>
> thanks.
>
> On Fri, Apr 17, 2009 at 20:37, Terry Gardner <Te...@sun.com>
> wrote:
>
> >
> > use addFieldError("fieldName","message");
> >
> > like:
> >
> > addFieldError("email",surname + ": invalid email address");
> >
> > The infrastructure marries this with the field named "email".
> >
> >
> > On Apr 17, 2009, at 2:31 PM, Stefano Tranquillini wrote:
> >
> > On Fri, Apr 17, 2009 at 20:29, Security Management <
> >> list-subscriptions@secmgmt.com> wrote:
> >>
> >> field errors
> >>>
> >>
> >>
> >> i don't know what is field-errors.
> >>
> >>
> >> --
> >> Stefano
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Stefano
RE: Display action errors above the field
Posted by Security Management <li...@secmgmt.com>.
Extend ActionSupport in your actions.
-----Original Message-----
From: Stefano Tranquillini [mailto:stefano.tranquillini@gmail.com]
Sent: Friday, April 17, 2009 2:40 PM
To: Struts Users Mailing List
Subject: Re: Display action errors above the field
a k.
tomorrow i'll try.
i've used only addFieldError("errors");
other things,i'll try to use getText in order to keep the text from the
proprieties but the getText method doesn't found.
i've to use some library?
thanks.
On Fri, Apr 17, 2009 at 20:37, Terry Gardner <Te...@sun.com> wrote:
>
> use addFieldError("fieldName","message");
>
> like:
>
> addFieldError("email",surname + ": invalid email address");
>
> The infrastructure marries this with the field named "email".
>
>
> On Apr 17, 2009, at 2:31 PM, Stefano Tranquillini wrote:
>
> On Fri, Apr 17, 2009 at 20:29, Security Management <
>> list-subscriptions@secmgmt.com> wrote:
>>
>> field errors
>>>
>>
>>
>> i don't know what is field-errors.
>>
>>
>> --
>> Stefano
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Display action errors above the field
Posted by Terry Gardner <Te...@Sun.COM>.
getText() is in ActionSupport.
On Apr 17, 2009, at 2:39 PM, Stefano Tranquillini wrote:
> a k.
>
> tomorrow i'll try.
>
> i've used only addFieldError("errors");
>
> other things,i'll try to use getText in order to keep the text from
> the
> proprieties but the getText method doesn't found.
>
> i've to use some library?
>
> thanks.
>
> On Fri, Apr 17, 2009 at 20:37, Terry Gardner <Te...@sun.com>
> wrote:
>
>>
>> use addFieldError("fieldName","message");
>>
>> like:
>>
>> addFieldError("email",surname + ": invalid email address");
>>
>> The infrastructure marries this with the field named "email".
>>
>>
>> On Apr 17, 2009, at 2:31 PM, Stefano Tranquillini wrote:
>>
>> On Fri, Apr 17, 2009 at 20:29, Security Management <
>>> list-subscriptions@secmgmt.com> wrote:
>>>
>>> field errors
>>>>
>>>
>>>
>>> i don't know what is field-errors.
>>>
>>>
>>> --
>>> Stefano
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Display action errors above the field
Posted by Stefano Tranquillini <st...@gmail.com>.
a k.
tomorrow i'll try.
i've used only addFieldError("errors");
other things,i'll try to use getText in order to keep the text from the
proprieties but the getText method doesn't found.
i've to use some library?
thanks.
On Fri, Apr 17, 2009 at 20:37, Terry Gardner <Te...@sun.com> wrote:
>
> use addFieldError("fieldName","message");
>
> like:
>
> addFieldError("email",surname + ": invalid email address");
>
> The infrastructure marries this with the field named "email".
>
>
> On Apr 17, 2009, at 2:31 PM, Stefano Tranquillini wrote:
>
> On Fri, Apr 17, 2009 at 20:29, Security Management <
>> list-subscriptions@secmgmt.com> wrote:
>>
>> field errors
>>>
>>
>>
>> i don't know what is field-errors.
>>
>>
>> --
>> Stefano
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Stefano
Re: Display action errors above the field
Posted by Terry Gardner <Te...@Sun.COM>.
use addFieldError("fieldName","message");
like:
addFieldError("email",surname + ": invalid email address");
The infrastructure marries this with the field named "email".
On Apr 17, 2009, at 2:31 PM, Stefano Tranquillini wrote:
> On Fri, Apr 17, 2009 at 20:29, Security Management <
> list-subscriptions@secmgmt.com> wrote:
>
>> field errors
>
>
> i don't know what is field-errors.
>
>
> --
> Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Display action errors above the field
Posted by Stefano Tranquillini <st...@gmail.com>.
On Fri, Apr 17, 2009 at 20:29, Security Management <
list-subscriptions@secmgmt.com> wrote:
> field errors
i don't know what is field-errors.
--
Stefano
RE: Display action errors above the field
Posted by Security Management <li...@secmgmt.com>.
Wouldn't you use field errors for that, and let the theme handle the
display?
-----Original Message-----
From: Stefano Tranquillini [mailto:stefano.tranquillini@gmail.com]
Sent: Friday, April 17, 2009 2:23 PM
To: Struts Users Mailing List
Subject: Display action errors above the field
Hi all
i'm starting with struts2, there's a possibilty to display the errors comes
from actionerros over the corrisponding field?
eg:
i've 3 fields:
- name
- surname
- email
the email si not valid, i want:
- name
- surname
* your email is not valid *
- email
if i put <s:actionerrors /> i see this thing:
* your email is not valid *
- name
- surname
- email
thanks.
--
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org