You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joe Germuska <jo...@germuska.com> on 2007/01/19 23:18:32 UTC
[S2] question about controlling display with css_xhtml theme and errors
So, I'm working on my first S2 application and enjoying a lot of the things
which always looked pretty cool about WebWork.
However, I'm doing client side validation with s:form and the "css_xhtml"
theme, and there's something I want to change.
Given my design, the insertion of error messages at the "top" of the control
looks awful. I want the messages at the bottom.
What is the best way to take control of this? I'm no CSS whiz, but I don't
think there's a way to do it just with CSS rules. Do I need to override the
definition of the "addError" javascript method which actually puts the
message in the HTML? That seems a lot harder than it should be.
Do I need to tell the designers that they designed it wrong? ;-)
Thanks in advance,
Joe
--
Joe Germuska
Joe@Germuska.com * http://blog.germuska.com
"The truth is that we learned from João forever to be out of tune."
-- Caetano Veloso
Re: [S2] question about controlling display with css_xhtml theme
and errors
Posted by Laurie Harper <la...@holoweb.net>.
Joe Germuska wrote:
> So, I'm working on my first S2 application and enjoying a lot of the things
> which always looked pretty cool about WebWork.
>
> However, I'm doing client side validation with s:form and the "css_xhtml"
> theme, and there's something I want to change.
>
> Given my design, the insertion of error messages at the "top" of the
> control
> looks awful. I want the messages at the bottom.
>
> What is the best way to take control of this? I'm no CSS whiz, but I don't
> think there's a way to do it just with CSS rules. Do I need to override
> the
> definition of the "addError" javascript method which actually puts the
> message in the HTML? That seems a lot harder than it should be.
>
> Do I need to tell the designers that they designed it wrong? ;-)
>
> Thanks in advance,
> Joe
I haven't played w/ client-side validation in S2 yet, but if it relies
on place-holder markup (i.e. an empty div or span or something in the
page that addError populates) you may be able to move it where you want
by customizing the theme's templates -- specifically, I would look at
controlheader.ftl, controlheader-core.ftl and controlfooter.ftl.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org