struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Vázquez Blázquez <pvazq...@denodo.com>
Subject Re: TabbedPanel question
Date Thu, 10 Jan 2008 15:49:34 GMT
Thank you for your reply.

I already had done sth similar as your 2nd point, but I´m having still a 
problem. My javascript code is executed before the document is loaded in 
the browser, so it changes my tab color (the one I want), but, then, it 
becames to the original color (because the load of the page overrides my 
changes). Do you know how can I do to execute this js code *after* the 
page is loaded?




Jeromy Evans escribió:
> Hi Pablo,
>
> This is probably too late for you, but take a look at the generated 
> HTML for the tabs.
> Unfortunately you'll see that each tab itself doesn't have a unique ID 
> (each container does, but not the tab itself).
> Each tab is assembled from a couple of divs and spans based on a 
> "sliding doors" css pattern.
> The selected tab nodes have a different style than the non-selected, 
> but otherwise they're all the same pattern.
>
> Unless dojo has a method in the widget already (which I don't know 
> of), you can change the style of each individual tab only in two ways:
>  a. use CSS3 selectors to apply style to the divs/spans based on their 
> position in the DOM (eg. the 3rd div has a green image).  It won't 
> work in IE though.
>  b. use javascript to simulate the same effect: iterate through these 
> nodes in the DOM and assign additional classes to them based on the 
> tab number/current tab. If you take the time to understand the 
> structure it'll be quite straightforward.
>
> Hope that helps.  Personally by now I would have started using a 
> widget from another library as you're not bound to use Dojo 0.4 with 
> Struts2.
>
> regards,
> Jeromy Evans
>
> Pablo Vázquez Blázquez wrote:
>> <script language="javascript">
>>        var tab = dojo.widget.byId("extractionTab");
>>       </script>
>>
>> Where "extractionTab" is a tab (a local div) inside a tabbedpanel. 
>> Now how can I access to style attributes?? I have searched for widget 
>> attributes, but I couldn't find anything interesting.
>>
>> Thanks,
>>
>> Martin Gainty escribió:
>>> Pablo
>>> you can set highlightColor attribute which will set colour for any 
>>> ids specified via 
>>> targets=http://struts.apache.org/2.x/docs/tabbedpanel.html
>>> Saludos 
>>> CordialesMartin______________________________________________Disclaimer 
>>> and confidentiality noteEverything in this e-mail and any 
>>> attachments relates to the official business of Sender. This 
>>> transmission is of a confidential nature and Sender does not endorse 
>>> distribution to any party other than intended recipient. Sender does 
>>> not necessarily endorse content contained within this transmission.> 
>>> Date: Mon, 31 Dec 2007 08:54:30 +0100> From: pvazquez@denodo.com> 
>>> To: user@struts.apache.org> Subject: Re: TabbedPanel question> > 
>>> Does somebody know if it is possible? I have a tabbedpanel and I 
>>> would > like to paint a tab in a different color if there is any 
>>> validation > error inside it.> > Thanks.> > Pablo Vázquez Blázquez

>>> escribió:> > Is it possible to paint each tab in the tabbedpanel in 
>>> a diferent > > color? I´m using Struts 2.0.9> >> > Thanks.>
>> >> > 
>>> ---------------------------------------------------------------------> 
>>> > 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> 
>>> _________________________________________________________________
>>> Share life as it happens with the new Windows Live.
>>> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007 
>>>
>>>   
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message