Thanks  a lot  Pawel and Dave for pointing me in the right direction.

For anyone with a similar problem , this is what I did.Although I never
quite understand when to put a ${ attribute } and when to put %{attribute}

<select>
                        <s:iterator value="listValues">
                            <option  value="<s:property value="code"/>"
style="color:${attribute}">
                            <s:property value="description"/>
                            </option>
                        </s:iterator>
  </select>

Thanks!
Vineith

2009/12/21 Paweł Wielgus <poulw...@gmail.com>

> Hi Vineith,
> the question is more about does HTML select options allow for such thing?
> Honestly i have no idea, also it has nothing to do with struts.
> But if the answear is yes, You can do it yourself, simply generate
> HTML code by hand. Create select html element by writing its HTML code
> and inside it, iterate over all your options and produce HTML option
> code for each but with special style added < option
> style="background-color: black;" />
>
> Best greetings,
> Pawel Wielgus.
>
>
> 2009/12/21, vineith kaul <vine...@gmail.com>:
> > Can someone please help me with this ?
> > Really appreciate any input.This is my first post on this struts2
> > mailing-list :-)
> >
> > Thanks!
> > Vineith
> >
> > On Sat, Dec 19, 2009 at 5:17 PM, Vineith Kaul <vine...@gmail.com> wrote:
> >
> >> Does anyone know how to differentially color options in struts 2 drop
> >> down.e.g I need one option to be in red other to be in blue etc.I tried
> to
> >> look for it - looks like has smthng to do with cssSyle but not sure how
> >> can
> >> we apply it for different options of the drop down.FYI : I m populating
> >> the
> >> drop down using the list attribute from the database.
> >>
> >>
> >> Thanks
> >> Vineith
> >>
> >>
> >>
> >
> >
> > --
> > Vineith Kaul
> > Bioinformatics Application Developer/Analyst
> > Department of Medical Genetics
> > Emory School of Medicine-Atlanta,GA
> > # 213-379-3539
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Vineith Kaul
Bioinformatics Application Developer/Analyst
Department of Medical Genetics
Emory School of Medicine-Atlanta,GA
# 213-379-3539

Reply via email to