0 Replies Latest reply on Jan 24, 2011 1:45 PM by Handycam

    Loaded XML links changing to lowercase in TLF text?

    Handycam Level 1

      I created an infographic template that contains a section for "related links", which you can see HERE. Except this time the links are broken: the producer put the links in the XML as upper/lower case, yet my app is apparently calling the URLs as lowercase, which is why they are broken.


      I am trying to figure out where and why my Flex app is calling the links as lower case. The links are in the XML as such:



           <p><a href="http://www.finewoodworking.com/Workshop/WorkshopDirectory.aspx?dir=Workbench+Jigs">The Basics: Workbench Jigs</a></p>
           <p><a href="http://www.finewoodworking.com/Workshop/WorkshopDirectory.aspx?dir=Power+Tool+Jigs">The Basics: Power Tool Jigs</a></p>
           <p><a href="http://www.finewoodworking.com/Workshop/WorkshopDirectory.aspx?dir=Tablesaw+Jigs">The Basics: Tablesaw Jigs</a></p>



      And are loaded like so from the XML:


      protected function dataSvc_resultHandler(event:ResultEvent):void 
                          relatedLinks = event.result.related.text();



      And formatted with a TLF textformat:


      private function configLinks():void {
           var cfg:Configuration = TextFlow.defaultConfiguration;
           var normalTLF:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkNormalFormat);
           normalTLF.color = 0x1F416A;
           var hoverTLF:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkHoverFormat);
           hoverTLF.color = 0xAD2601;
           hoverTLF.textDecoration = TextDecoration.NONE;
           var activeTLF:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkActiveFormat);
           activeTLF.color = 0xAD2601;
           cfg.defaultLinkNormalFormat = normalTLF;
           cfg.defaultLinkHoverFormat = hoverTLF;
           cfg.defaultLinkActiveFormat = activeTLF;
           TextFlow.defaultConfiguration = cfg;



      And lastly assigned to a RichText object:



      <s:Label text="Related Links:" styleName="relatedTitle"/>
      <s:RichEditableText selectable="false" editable="false" id="richTxt" paragraphSpaceAfter="0" color="#f06d1e" 
                               textFlow="{TextConverter.importToFlow(relatedLinks, TextConverter.TEXT_FIELD_HTML_FORMAT)}"  width="100%"/>