tags:

views:

579

answers:

1

I am trying to implement a search page with 2 tabs: Basic Search Options and Advanced Search Options. The Search button is outside the tab at the bottom of the page.

I am trying to figure out which switchType to use on the rich:tab component. richfaces offers 3 switch types:

  1. ajax
  2. server
  3. client

I don't understand when someone who use one over the other.

Can someone explain succinctly when/how you would use the different switchTypes?

Thanks in advance!

April26

+2  A: 

Examples of the three types here.

  1. Ajax - When the tab is clicked on the body of the tab is requested from the server without refreshing the entire page. This makes the initial load time of the page with tabs faster than client type and allows the user to click between tabs without refreshing the entire page.

  2. Server - When the tab is clicked on the entire page is refreshed to get the body of the tab. Use Server type when you won't to keep the tab page load time down but don't what any ajax code. Clicking between tabs is not very smooth looking.

  3. Client - All tab body's are loaded when the tab page is loaded. The initial load of the page is slower but switching between tabs is much faster for the user.

I've created several pages that use richfaces tabs and they all have used the client type of switching. It makes the tabs more usable if the user doesn't have to wait when they click on a tab.

Mark Robinson
The only time I use anything other than Client is when I have a lot of data on any tab other than the first one. In cases like this I use Ajax type.
Damo