title: Using an ItemRenderer to output filenames from a path
body: <p>I am pretty new to actionscript, I am receiving a XML list of file paths. I need to extract the file name from this so I set up a itemRenderer but I dont get anything for the name. I have added a break point and my fileName does contain the correct filename, but it is never shown in the view. What am I doing wrong?</p>
  
  <p>View Code:</p>
  
  <pre><code>&lt;s:SkinnableContainer width="100%"&gt;
      &lt;s:DataGroup itemRenderer="modules.custFiles.renderers.CustFileItemRenderer" dataProvider="{custFiles}" width="100%"&gt;
          &lt;s:layout&gt;
              &lt;s:VerticalLayout gap="0"/&gt;
          &lt;/s:layout&gt;
      &lt;/s:DataGroup&gt;
  &lt;/s:SkinnableContainer&gt;
  </code></pre>
  
  <p>Renderer Code:</p>
  
  <pre><code>override public function set data(value:Object):void
  {
      var node:XML = value as XML;
      _link = node.toString();
      var filename:RegExp = /[^\/\/]*$/ig;
      filename.text = _link.match(filename);
  
      super.data = value;
  }
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://mysite.com/srv"&gt;
  &lt;string&gt;
  http://mysite.com/files/custFiles/custfile-1.pdf
  &lt;/string&gt;
  &lt;string&gt;
  http://mysite.com/files/custFiles/custfile-2.pdf
  &lt;/string&gt;
  &lt;/ArrayOfString&gt;
  </code></pre>