users@woodstock.java.net

Re: TabSet Component - how to dynamically set the tab (in javascript)

From: Venkatesh Babu <Venkatesh.M_at_Sun.COM>
Date: Mon, 04 Feb 2008 17:22:33 +0530

I am not sure what you mean here..
Do you mean to say that you use virtual forms to submit values?

The tabset does not have any client side interfaces
Take a look at the component's tld docs.
http://webdev2.sun.com/woodstock-tlddocs

You need to refresh the page to actually set the selected tab.

-Venky
Chris Fleischmann wrote:
> Thanks for your quick response...
>
> I have used "auto-submit" and virtual forms, plus the backing bean to
> manipulate the tab selected...
>
> Thanks,
>
> Chris
>
>
>
> Venkatesh Babu wrote:
>> Hi Chris,
>>
>> The present tabset does not have any client side javascript
>> functionalities such as setting a selected tab or creating tabs
>> dynamically. There is a client side tabset in works which will have
>> client side javascript features.
>>
>> -Venky
>> Chris Fleischmann wrote:
>>> Howdy folks, I have a tabset with two child tabs...
>>>
>>> I have a 2 checkboxes outside of the tabset (in the form), 1 for
>>> each tab -
>>> if one is selected I would like to set focus (and render
>>> accordingly) to
>>> that particular tab in accordance with the checkbox selected. So,
>>> if (checkbox1.checked == true) SET TABSET to TAB1
>>> if (checkbox2.checked == true) SET TABSET to TAB2
>>>
>>> I have tried,
>>> document.getElementById("form1:tabSet1").selected = "tab2";
>>>
>>> but that does not seem to work... is there any workarounds...
>>>
>>> I know in the bean backing code I can use the method setSelected (for
>>> example in the prerender method), but how to do it
>>> dynamically/client side?
>>>
>>> Your thoughts/help appreciated,
>>>
>>> Chris
>>>
>>>
>>>
>