Thursday, August 8, 2013

Handling the select event of dojo tab container

Handling the select event of dojo tab container:

<div data-dojo-type="dijit/layout/TabContainer" style="height:  400px;" id="client">
   <div id="usersTab" data-dojo-type="dijit/layout/ContentPane" title="Users" >
  <div id="akrTdrTab" data-dojo-type="dijit/layout/ContentPane" title="AKR/TDR" >

Add the below code in the JSP page to handle the selection event of the tab.

      dojo.addOnLoad(function() {
             tabContainer = dijit.byId('client');
             dojo.connect(tabContainer, "selectChild",handleSelectedTabs);

    function handleSelectedTabs(selectedTab){
                  case "usersTab":searchUsersData();
                  case "akrTdrTab":searchAkrtdrData();

No comments:

Post a Comment