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 13:59:18 +0530

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
>
>
>