Hi Brian,
I just tried a simple example like this
<webuijsf:tab id="tab4" text="Three" style="color:red">
<webuijsf:staticText text="Contents on page 3"/>
<webuijsf:button text="Button4"/>
</webuijsf:tab>
And the output i could see was:
<td>
<a id="tabsexample:tabset2:tab4" class="Tab1Lnk_sun4 TabPad_sun4"
style="color: red;" onclick="return
webui.suntheme.hyperlink.submit(this, 'tabsexample', null);" href="#">
Three </a>
</td>
So, the style is being rendered for me. I can see the particular tab text being rendered in red color.
Could you re-try your example again?
-Venky
Brian.Dahl_at_expeditors.com wrote:
>
> Thanks for the reply
>
> Setting the style of the td tag won't really help me, because I need
> to be able to
> dynamically set the style from the backing bean, and I need to be able
> to make
> each tab look different.
>
> And regardless of whether or not you can style the background of an
> anchor tag,
> you should be able to style something. The TLD Dogs say style and
> styleClass
> are both valid attributes for the tab woodstock object... but if you
> do something like this:
>
> <webuijsf:tab id="aTab" text="someStuff" style="color:green">
>
> Nothing turns green and you can do a full text search on the HTML
> source and not
> find "green" anywhere. I'd think it'd either be associated to the td
> or the a for the tab,
> but no dice.
>
> Is the documentation for tab wrong to say that you can assign style or
> styleClass?
>
> Thanks,
> Brian
>
>
>
> *Venkatesh Babu <Venkatesh.M_at_Sun.COM>*
> Sent by: Venkatesh.M_at_Sun.COM
>
> 12/19/2007 10:50 PM
> Please respond to
> users_at_woodstock.dev.java.net
>
>
>
> To
> users_at_woodstock.dev.java.net
> cc
>
> Subject
> Re: Tab Component not using style or styleClass (resend)
>
>
>
>
>
>
>
>
>
> The tab renderer inherits from the hyperlink's renderer.
> Hence, the tab renderer is essentially rendering an HTML "<a>" tag.
> I am not sure whether you can actually apply a background image to the
> "<a>" tag.
>
> However, if you look at the generated HTML, You would see that the tab
> is essentially rendered
> within a <td> table column of the tabset.
>
> <td>
> <a id="form:tabset:tabOrderableList" class="Tab1Lnk_sun4"
> onclick="return webui.suntheme.hyperlink.submit(this, 'form', null);"
> href="#">
> Orderable List
> </a>
> </td>
>
> So, you could try setting the styleclass on the tabSet component with
> the background style being set on the "td" element.
>
>
>
> -Venky_
> __Brian.Dahl_at_expeditors.com_ <mailto:Brian.Dahl_at_expeditors.com> wrote:
>
> (Sorry for the resend spam... I forgot the subject)
>
> Hello,
>
> I’m having a problem with the tab component. I have a requirement to
> be able to place
> images into a tab itself, next to the text (in order to show an “at a
> glance” sort of status).
> Unfortunately Woodstock doesn’t seem to support this sort of action
> right out of the box.
> The way around this we came up with was to style the individual tabs
> and just do some
> css work with the background-image property. This brought up its own
> problem though.
> It appears that the tab component ignores both the style and
> styleClass attributes.
>
> Right now my page has some code that looks like this:
>
> <webuijsf:tabSet selected="tab1" mini="true" lite="true">
> <webuijsf:tab id="tab1" text="Im a tab!" styleClass="someClass"
> style=”background-color:purple”>
> Stuff in the tab
> </webuijsf:tab>
> ..
> </webuijsf:tabSet>
>
> When I load the page, everything looks as though no style has been
> applied. I can also
> search the source for the class and attributes and not locate them.
> Now… if I move the
> attributes up to the tabSet level, so it looks like this…
>
> <webuijsf:tabSet selected="tab1" mini="true" lite="true"
> styleClass="someClass" style=”background-color:purple”>
> <webuijsf:tab id="tab1" text="Im a tab!">
> Stuff in the tab
> </webuijsf:tab>
> ..
> </webuijsf:tabSet>
>
> …everything in the tab section EXCEPT the tabs themselves show up with
> the expected
> attributes. I can also search the source and find someClass defined as
> a class and my
> background-color definition.
>
> According to the tld docs, style and styleClass are both attributes of
> the tab component…
> but it doesn’t seem like they are rendered.
>
> Any suggestions? Also if there’s a “right” way to put an image on a
> tab, that would be great too.
>
> Thank you,
> Brian
>