Re: Display action errors above the field
i found and modified! thanks On Sat, Apr 18, 2009 at 15:16, Dave Newton 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-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Display action errors above the field
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-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Display action errors above the field
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-subscripti...@secmgmt.com> wrote: > Extend ActionSupport in your actions. > > > > -Original Message- > From: Stefano Tranquillini [mailto:stefano.tranquill...@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 > 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-subscripti...@secmgmt.com> wrote: > >> > >> field errors > >>> > >> > >> > >> i don't know what is field-errors. > >> > >> > >> -- > >> Stefano > >> > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > -- > Stefano > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Stefano
RE: Display action errors above the field
Extend ActionSupport in your actions. -Original Message- From: Stefano Tranquillini [mailto:stefano.tranquill...@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 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-subscripti...@secmgmt.com> wrote: >> >> field errors >>> >> >> >> i don't know what is field-errors. >> >> >> -- >> Stefano >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Display action errors above the field
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 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-subscripti...@secmgmt.com> wrote: field errors i don't know what is field-errors. -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
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 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-subscripti...@secmgmt.com> wrote: >> >> field errors >>> >> >> >> i don't know what is field-errors. >> >> >> -- >> Stefano >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Stefano
Re: Display action errors above the field
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-subscripti...@secmgmt.com> wrote: field errors i don't know what is field-errors. -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Display action errors above the field
On Fri, Apr 17, 2009 at 20:29, Security Management < list-subscripti...@secmgmt.com> wrote: > field errors i don't know what is field-errors. -- Stefano
RE: Display action errors above the field
Wouldn't you use field errors for that, and let the theme handle the display? -Original Message- From: Stefano Tranquillini [mailto:stefano.tranquill...@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 i see this thing: * your email is not valid * - name - surname - email thanks. -- Stefano - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org