title: Check boxes and list android flash builder
body: <p>I have a view which gets the data from the homeview </p>
  
  <blockquote>
    <p>navigator.pushView(views.TripDetails, tripList.selectedItem, null,
    fadeTrans);</p>
  </blockquote>
  
  <p>I have setup list in the TripDetails view to display check boxes using the following code. And this display all the check boxes the way i want them. But, now I want to it save the value of the check box checked in the data base and keep the check boxes checked until submit is clicked. But, using persistence manager, has the check boxes true always. I am not sure what is the approach. And even this entire I have is wrong or correct.</p>
  
  <p>Thank you all </p>
  
  <pre><code>    &lt;s:List id="AnswerList" width="100%" height="100%" dataProvider="{data.PromptText}"&gt;
    &lt;s:itemRenderer&gt;
      &lt;fx:Component&gt;
          &lt;s:ItemRenderer  visible="true"&gt;
              &lt;fx:Script&gt;
                  &lt;![CDATA[
                  import spark.managers.PersistenceManager;
                  protected function addHandler(event:Event):void
                  {
                      var loadManger:PersistenceManager= new PersistenceManager();
  
                      if (loadManger.load())
                      {
                          namefield.selected=false;
                          var savedData:Object = loadManger.getProperty("namefield");
                                          if(savedData)
                                          {
                                           namefield.selected=savedData;
                                          }
                      }
                  }
                  override public function set data(value:Object):void { 
                      super.data =value; 
  
  
                      if (value== null) 
                          return; 
  
                       namefield.label =value.toString() ;
  
                          namefield.visible = true;
  
  
                  } 
  
  
                      protected function namefield_clickHandler(event:MouseEvent):void
                      {
                          // TODO Auto-generated method stub
                          var saveManager:PersistenceManager = new PersistenceManager();
                                      saveManager.setProperty("namefield",namefield.selected);
                      }
  
                  ]]&gt;
              &lt;/fx:Script&gt;
              &lt;s:CheckBox id="namefield" width="100%" color="0xFFCC00" visible="false" add="addHandler(event)" click="namefield_clickHandler(event)"/&gt;
              &lt;s:layout&gt;
                  &lt;s:VerticalLayout/&gt;
              &lt;/s:layout&gt;
          &lt;/s:ItemRenderer&gt;
      &lt;/fx:Component&gt;
  &lt;/s:itemRenderer&gt;
      &lt;s:layout&gt;
          &lt;s:VerticalLayout/&gt;
      &lt;/s:layout&gt;
  
      &lt;/s:List&gt;
  </code></pre>