title: Whats mistake in my code
body: <p>Iam tyring to reproduce the same output as this: <code>http://tourdeflex.adobe.com/flex4samples/GroupsAndContainers/TabbedNavigator/sample1.html</code></p>
  
  <p>Below is my own code developed myself, but iam not getting required output.. dont know what went wrong. pls kindly run my code and provide me correct solution:</p>
  
  <p><strong>TabBarDemo.mxml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                 xmlns:s="library://ns.adobe.com/flex/spark" 
                 xmlns:mx="library://ns.adobe.com/flex/mx"  xmlns:components="components.*"&gt;
  
      &lt;fx:Script&gt;
          &lt;![CDATA[
              import events.EmployeeEvent;
  
              import mx.collections.ArrayCollection;
              import mx.controls.Alert;
  
              import vo.EmployeeVO;
  
              public var empVO: EmployeeVO;
  
              [Bindable]
              public var empList: ArrayCollection;
  
              protected function contactInfo_employeeEventHandler(event:EmployeeEvent):void
              {
                  empVO = event.employeeInfoVO;
  
                  if(empVO != null)
                      empList.addItem(empVO);
                  else
                      Alert.show("Object is null");
  
              }
          ]]&gt;
      &lt;/fx:Script&gt;
  
      &lt;fx:Declarations&gt;
          &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
      &lt;/fx:Declarations&gt;
  
  
      &lt;s:VGroup&gt;
  
          &lt;s:TabBar dataProvider="{contact}" /&gt;
  
          &lt;mx:ViewStack id="contact"
                        resizeToContent="true"&gt;
  
              &lt;components:ContactInfo id="contactInfo"
                                      label="Employee Info" 
                                      employeeEvent="contactInfo_employeeEventHandler(event)"/&gt;
  
              &lt;components:ContactList label="Employee List"
                                      empList="{empList}"/&gt;
  
  
          &lt;/mx:ViewStack&gt;
  
      &lt;/s:VGroup&gt;
  
  &lt;/s:Application&gt;
  </code></pre>
  
  <p><strong>ContactInfo.mxml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"&gt;
  
  
      &lt;fx:Metadata&gt;
  
          [Event(name="employeeEvent", type="events.EmployeeEvent")]
  
      &lt;/fx:Metadata&gt;
  
      &lt;fx:Script&gt;
          &lt;![CDATA[
              import events.EmployeeEvent;
  
              import vo.EmployeeVO;
  
  
              protected function submit_clickHandler(event:MouseEvent):void
              {
                  var empVO: EmployeeVO = new EmployeeVO();
  
                  empVO.empName = empName.text;
                  empVO.address = address.text;
                  empVO.state = state.text;
                  empVO.city = city.text;
                  empVO.zip = zip.text;
  
                  var empEvent: EmployeeEvent = new EmployeeEvent("employeeEvent", empVO);
                  dispatchEvent(empEvent);
  
              }
          ]]&gt;
      &lt;/fx:Script&gt;
  
      &lt;fx:Declarations&gt;
          &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
      &lt;/fx:Declarations&gt;
  
      &lt;s:Form&gt;
  
          &lt;s:FormItem label="Name"&gt;
              &lt;s:TextInput id="empName"/&gt;
          &lt;/s:FormItem&gt;
  
          &lt;s:FormItem label="Address"&gt;
              &lt;s:TextInput id="address" /&gt;
          &lt;/s:FormItem&gt;
  
          &lt;s:FormItem label="City"&gt;
              &lt;s:TextInput id="city" /&gt;
          &lt;/s:FormItem&gt;
  
          &lt;s:FormItem label="State"&gt;
              &lt;s:TextInput id="state" /&gt;
          &lt;/s:FormItem&gt;
  
          &lt;s:FormItem label="Zip"&gt;
              &lt;s:TextInput id="zip" /&gt;
          &lt;/s:FormItem&gt;
  
          &lt;s:FormItem&gt;
              &lt;s:Button id="submit"
                        label="Submit" 
                        click="submit_clickHandler(event)"/&gt;
          &lt;/s:FormItem&gt;
  
      &lt;/s:Form&gt;
  
  &lt;/s:NavigatorContent&gt;
  </code></pre>
  
  <p><strong>ContactList.mxml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"
           &gt;
  
      &lt;fx:Script&gt;
          &lt;![CDATA[
              import mx.collections.ArrayCollection;
  
              import spark.components.List;
  
              import vo.EmployeeVO;
  
              [Bindable]
              public var empList: ArrayCollection;
  
  
  
          ]]&gt;
      &lt;/fx:Script&gt;
  
      &lt;fx:Declarations&gt;
          &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
      &lt;/fx:Declarations&gt;
  
      &lt;s:DataGrid dataProvider="{empList}"/&gt;
  
  &lt;/s:NavigatorContent&gt;
  </code></pre>
  
  <p><strong>EmployeeEvent.as</strong></p>
  
  <pre><code>package events
  {
      import flash.events.Event;
  
      import vo.EmployeeVO;
  
      public class EmployeeEvent extends Event
      {
  
          public var employeeInfoVO: EmployeeVO;
  
          public function EmployeeEvent(type: String, employeeInfoVO: EmployeeVO)
          {
              super(type);
              this.employeeInfoVO = employeeInfoVO;
          }
      }
  }
  </code></pre>
  
  <p><strong>EmployeeVO.as</strong></p>
  
  <pre><code>package vo
  {
      public class EmployeeVO
      {
          public function EmployeeVO()
          {
          }
  
          public var empName: String;
          public var address: String;
          public var state: String;
          public var city: String;
          public var zip: String;
  
  
      }
  }
  </code></pre>
  
  <p>Awaiting your responses!</p>