You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Pratibha <pr...@gmail.com> on 2012/08/30 12:46:21 UTC

css style in listview

Hi team

i like to add  style in listview as mentioned below 
item.add(new SimpleAttributeModifier("style", "background-colr:red"));

Its not working for me but rest others are working




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/css-style-in-listview-tp4651642.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: css style in listview

Posted by Eric Jablow <er...@gmail.com>.
On Thu, Aug 30, 2012 at 6:46 AM, Pratibha <pr...@gmail.com> wrote:
> Hi team
>
> i like to add  style in listview as mentioned below
> item.add(new SimpleAttributeModifier("style", "background-colr:red"));
>
> Its not working for me but rest others are working

It is better to use classes instead of inline styles. Besides changing
background-colr to background-color in your CSS file, you should also
set the color CSS attribute. If you change one, change both; otherwise
you risk printing black text on black background. So, create a CSS
file, add it to the page header, and set the classes at need. Look up
IHeaderResponse.

Actually, if you want the entire background to be red, you want to
style a container of the list view. If you want individual items to be
red based on their content, then you want to install a Behavior
instead of going over the items by hand.

SimpleAttributeModifier is deprecated anyway.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: css style in listview

Posted by Adam Gray <ad...@gmail.com>.
It could be this: " background-colr:red ".  You're missing an 'o' in there.

On Thu, Aug 30, 2012 at 6:55 AM, Martin Grigorov <mg...@apache.org>wrote:

> Hi,
>
> On Thu, Aug 30, 2012 at 12:46 PM, Pratibha <pr...@gmail.com>
> wrote:
> > Hi team
> >
> > i like to add  style in listview as mentioned below
> > item.add(new SimpleAttributeModifier("style", "background-colr:red"));
> >
> > Its not working for me but rest others are working
>
> Please define "it's not working". We need more information to be able
> to help you.
>
> >
> >
> >
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/css-style-in-listview-tp4651642.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: css style in listview

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Thu, Aug 30, 2012 at 12:46 PM, Pratibha <pr...@gmail.com> wrote:
> Hi team
>
> i like to add  style in listview as mentioned below
> item.add(new SimpleAttributeModifier("style", "background-colr:red"));
>
> Its not working for me but rest others are working

Please define "it's not working". We need more information to be able
to help you.

>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/css-style-in-listview-tp4651642.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org