You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by wild_oscar <mi...@almeida.at> on 2008/07/14 12:14:45 UTC
[S2] s:property - how to use CSS on it?
Because I want just a simple list of actionErrors, I have an iterator for the
actionErrors such as:
<s:iterator value="actionErrors" >
<s:property/>
</s:iterator>
However, how can I use Css calsses on the property? I want to display the
error in red, but the property element doesn't have any CSS property. What's
the best way of applying a Css syle to it?
--
View this message in context: http://www.nabble.com/-S2--s%3Aproperty---how-to-use-CSS-on-it--tp18440945p18440945.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] s:property - how to use CSS on it?
Posted by Gabriel Belingueres <be...@gmail.com>.
You could pass a css class to the <s:actionerror> tag.
If the HTML code that produces <s:actionerror> doesn't satisfy you,
you can define your own actionerror.ftl template.
2008/7/14 wild_oscar <mi...@almeida.at>:
>
> Because I want just a simple list of actionErrors, I have an iterator for the
> actionErrors such as:
>
> <s:iterator value="actionErrors" >
> <s:property/>
> </s:iterator>
>
> However, how can I use Css calsses on the property? I want to display the
> error in red, but the property element doesn't have any CSS property. What's
> the best way of applying a Css syle to it?
>
> --
> View this message in context: http://www.nabble.com/-S2--s%3Aproperty---how-to-use-CSS-on-it--tp18440945p18440945.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] s:property - how to use CSS on it?
Posted by wild_oscar <mi...@almeida.at>.
Thank you.The tag works fine for now. I will also look into modifying the
actionerror template when I need a more customized tag.
newton.dave wrote:
>
> --- On Mon, 7/14/08, wild_oscar <mi...@almeida.at> wrote:
>> <s:iterator value="actionErrors" >
>> <s:property/>
>> </s:iterator>
>>
>> However, how can I use Css calsses on the property? I want
>> to display the error in red, but the property element doesn't
>> have any CSS property. What's the best way of applying a Css
>> syle to it?
>
> <s:property/>
>
> (Or <div...>, or put it in a list and have a class for list elements,
> or... any other CSS methodology.)
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-S2--s%3Aproperty---how-to-use-CSS-on-it--tp18440945p18444061.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] s:property - how to use CSS on it?
Posted by Dave Newton <ne...@yahoo.com>.
--- On Mon, 7/14/08, wild_oscar <mi...@almeida.at> wrote:
> <s:iterator value="actionErrors" >
> <s:property/>
> </s:iterator>
>
> However, how can I use Css calsses on the property? I want
> to display the error in red, but the property element doesn't
> have any CSS property. What's the best way of applying a Css
> syle to it?
<span class="..."><s:property/></span>
(Or <div...>, or put it in a list and have a class for list elements, or... any other CSS methodology.)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org