Tabbed Panel: Open certain tab after button is clicked

Does anyone know how to programmticallty open a tab after an event occurs? In this case I have an X Page with a tabbed panel,search button, and edit box. There are two tabs. The first displays a list of search results with a radio button to pick one of the results. The second displays information about the result that was picked from the first panel. After the button is clicked I would like to set the focus, or open, the first tab panel that displays the results. Right now the button does a Full Update but the user is not directed to the first tab to see the results if they are on the second tab.

Subject: Open Specific Tab in Tabbed Panel

If you’re doing a refresh, you should be able to do that without too much difficulty. If you select your tabbed panel there is the ‘Tab opened by default’ option. You can set a scoped variable (viewScope if you’re doing a partial refresh), compute the value for that based on the existence of the viewScope variable. Alternatively, compute it based on the value of your radio button. The result needs to be the name property of the relevant tab.

I’ve done this very successfully with a database-wide search function, with different types of documents on sseparate tabs. I then default to the first tab that has results.

Subject: Still no luck

I have set the ‘Tab opened by default’ to the name of the first tab ‘Search’ since this is the only tab I want opened by default. The search button has the Full Update option set for server options. I still cannot get the focus set to the ‘Search’ tab after the button is clicked and there is a full update run on the page. (This is in the event of course that the user is on a different tab). The user has to navigate away from the page then back for the focus to be set to the ‘Search’ tab. I must be missing something small but I cannot find any working examples.

Subject: Re: Tabbed Panel: Open certain tab after button is clicked

The search functionality I use this in uses the OpenPage simple action to fully load the XPage, which is guess is simulating the user going to another page and coming back. Is this an option?

It may be worth looking at what is done for the tutorial on the Domino Designer wiki http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-intro-to-XPages.htm

This uses a separate XPage for each tab, with the tabbed table in a custom control used by each XPage. The Tab Opened By Default set to a property of the custom control, passed from the XPage. Code is then put on each tabPanel element then to open the relevant page. Exercise 14 is the one that explins how to do this.